using BrainTechLLC;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace Mud.EmlenMudMain
{
    public class FightData : IFightData
    {

        public FightData()
        {
            storedData = new int[(int)StoredFightData.CurrentMaxStoredFightData];
            for (int i = 0; i < (int)StoredFightData.CurrentMaxStoredFightData; i++)
            {
                storedData[i] = 0;
            }
        }

        private GroundFightPositions grndfightPosition = GroundFightPositions.None;		// Groundfight position
        private int[] storedData;
        private CharacterData chFollowing = null;		/* Leader, for following */
        private CharacterData chMaster = null;		/* Master, for grouping, charming */
        private List<long> rgHunting = new List<long>();		/* Hunting for/tracking */
        private CharacterData chMountedBy = null;	/* Mounted by */
        private CharacterData chRiding = null;		/* Riding for mounts */
#if NO_SILVERLIGHT
        [NonSerialized]
#endif
        private DateTime combatDelayUntil = DateTime.MinValue;
        private CharacterData chAttacking = null;	/* Currently chAttacking */
        private string szUserArguments = "";
        /* Built-in script stuff below - goes in fightInfoInternal.  OOOLD format! */
        private CharacterData caller = null;
        private List<string> next_commands = new List<string>();


        public int this[StoredFightData storedDataType]
        {
            get
            {
                return storedData[(int)storedDataType];
            }
            set
            {
                storedData[(int)storedDataType] = value;
            }
        }

        public GroundFightPositions GroundfightPosition
        {
            get { return grndfightPosition; }
            set { grndfightPosition = value; }
        }


        public int[] StoredFightDataValues
        {
            get { return storedData; }
            set { storedData = value; }
        }

        public CharacterData FollowingCharacter
        {
            get { return chFollowing; }
            set { chFollowing = value; }
        }

        public CharacterData Master
        {
            get { return chMaster; }
            set { chMaster = value; }
        }

        public CharacterData RidingCharacter
        {
            get { return chRiding; }
            set { chRiding = value; }
        }

        public CharacterData MountedByCharacter
        {
            get { return chMountedBy; }
            set { chMountedBy = value; }
        }

        public List<long> HuntingCharacters
        {
            get { return rgHunting; }
            set { rgHunting = value; }
        }

        public CharacterData AttackingCharacters
        {
            get { return chAttacking; }
            set { chAttacking = value; }
        }

        public DateTime CombatDelayUntil
        {
            get { return combatDelayUntil; }
            set { combatDelayUntil = value; }
        }

        public bool IsDelayed
        {
            get { return (combatDelayUntil > EmlenMud.DynamicWorld.CurrentTime.dt); }
            set { if (value == false) { combatDelayUntil = DateTime.MinValue; } }
        }

        public CharacterData Following { get { return chFollowing; } }

        public CharacterData Caller
        {
            get { return caller; }
            set { caller = value; }
        }

        public string SzUserArguments
        {
            get { return szUserArguments; }
            set { szUserArguments = value; }
        }

        //public CombatField field;
        //public int pos_x;
        //public int pos_y;		

        public List<string> NextCombatCommands
        {
            get { return next_commands; }
            set { next_commands = value; }
        }

    }

    // OLD CODE to PORT including objImage interface stuff....

    //COMBAT_FIELD *field_list=NULL;
    //COMBAT_FIELD *free_field_list=NULL;
    //bool closeto=FALSE;
    //#define FIELD_TICK_WAIT 5


    //bool remove_from_combat_field(CharacterData chr);
    //bool remove_from_combat_field_yes(CharacterData chr);

    //void act_to_non_java(string arg, CharacterData chr) {
    //   CharacterData c;
    //   if (!chr->inRoom) return;
    //   for (c=chr->inRoom->MoreRoomInfo->people;c;c=c->next_in_room) {
    //      if (IS_JAVA(c)) continue;
    //      if (c==chr) continue;
    //      currentActionsAndBehavior(arg,c,NULL,chr,TO_CHAR);
    //   }
    //   return;
    //}

    //#ifndef OLD_FIGHT
    //bool nobody_near(CharacterData c) {
    //   int x,y;
    //   COMBAT_FIELD *cf;
    //   if (!c->fightInfoInternal || !c->fightInfoInternal->field) return TRUE;
    //   x=c->fightInfoInternal->pos_x;
    //   y=c->fightInfoInternal->pos_y;
    //   cf=c->fightInfoInternal->field;
    //   if (x>0 && cf->map[x-1][y]!=NULL) return FALSE;
    //   if (x<6 && cf->map[x+1][y]!=NULL) return FALSE;
    //   if (y>0 && cf->map[x][y-1]!=NULL) return FALSE;
    //   if (y<6 && cf->map[x][y+1]!=NULL) return FALSE;
    //   return TRUE;
    //}


    ///* For field_move, we can be sure fightInfoInternal exists, as well as field and other
    //related sub-structures.  POSSIBLE debug trap later if problems arise. */
    //void field_move(CharacterData chr, int moveDirection) {
    //   int i,j;
    //   int x,y;
    //   COMBAT_FIELD *f=chr->fightInfoInternal->field;
    //   if (moveDirection==-1) return;
    //   if (chr->position==POSITION_GROUNDFIGHTING) return;

    //   i=chr->fightInfoInternal->pos_x;
    //   j=chr->fightInfoInternal->pos_y;
    //   if (moveDirection==DIR_NORTH && j>0) {
    //      x=i;
    //      y=j-1;
    //   } else
    //      if (moveDirection==DIR_SOUTH && j<6) {
    //         x=i;
    //         y=j+1;
    //      } else
    //         if (moveDirection==DIR_EAST && i<6) {
    //            x=i+1;
    //            y=j;
    //         } else
    //            if (moveDirection==DIR_WEST && i>0) {
    //               x=i-1;
    //               y=j;
    //            } else
    //            { /* moving off battle field... */
    //               /*fprintf(stderr,"%s tried to MPCurrent in moveDirection %d.\n",NAME(chr),moveDirection);
    //               */
    //               send_to_char("If you want to flee, type FLEE...\n\r",chr);
    //               return;
    //            }
    //            if (f->map[x][y]!=NULL) {
    //               /* Okay, we moved INTO someone.. attack!! */
    //               if (IS_PLAYER(chr) && IS_PLAYER(f->map[x][y]) && FIGHTING(f->map[x][y])!=chr && FIGHTING(chr)!=f->map[x][y] && !not_is_same_align(chr,f->map[x][y])) {
    //                  return;
    //               }
    //               if (IS_MOB(chr) && IS_MOB(f->map[x][y]) && FIGHTING(chr)!=f->map[x][y] &&
    //                  FIGHTING(f->map[x][y])!=chr) {
    //                     return;
    //               }
    //               /* CHECK FOR FRIENDS/ETC HERE */
    //               hitop=FALSE;
    //               multi_hit(chr,f->map[x][y],TYPE_UNDEFINED);
    //               if (hitop) {
    //                  java_hit_field(f,chr,i,j,x,y);
    //               } else
    //               { /* Send miss here? */
    //               }
    //            } else
    //            {
    //               /*for (tx=0;tx<7;tx++) {
    //               for (ty=0;ty<7;ty++) {
    //               if (f->map[tx][ty]) {*/
    //               java_update_field(f,chr,i,j,x,y);
    //               /*}
    //               }
    //               }*/
    //               f->map[i][j]=NULL;
    //               f->map[x][y]=chr;
    //               chr->fightInfoInternal->pos_x=x;
    //               chr->fightInfoInternal->pos_y=y;
    //               if (chr->MPCurrent<4) {
    //                  send_to_char("You are too exhausted to MPCurrent!\n\r",chr);
    //                  return;
    //               }
    //               SUBMOVE(chr,3);
    //               /* sprintf(buf, "$N moves to %d, %d.",x,y);
    //               act_to_non_java(buf,chr);*/
    //               /*	if (!IS_JAVA(chr)) {
    //               sprintf(buf, "You advance.\n\r");
    //               send_to_char(buf,chr);
    //               }*/

    //            }
    //            return;
    //}
    //#endif

    ///* Returns direction if the mob/target is next to the person on the field */
    //int is_fighting_near(CharacterData chr, CharacterData target) {
    //#ifndef OLD_FIGHT
    //   COMBAT_FIELD *cf=chr->fightInfoInternal->field;
    //   int i=chr->fightInfoInternal->pos_x;
    //   int j=chr->fightInfoInternal->pos_y;
    //   if (cf==NULL) return -1;
    //   if (!target) {
    //      remove_from_combat_field(chr);
    //      return -1;
    //   }
    //   check_fgt(target);
    //   if (cf!=target->fightInfoInternal->field) return -1;
    //   if (i>0 && cf->map[i-1][j]==target) return DIR_WEST;
    //   if (i<6 && cf->map[i+1][j]==target) return DIR_EAST;
    //   if (j>0 && cf->map[i][j-1]==target) return DIR_NORTH;
    //   if (j<6 && cf->map[i][j+1]==target) return DIR_SOUTH;
    //   return -1;
    //#else
    //   return 1;
    //#endif
    //}

    ///* This updates all combat field movement, etc */
    //void combat_field_update(void) {
    //#ifndef OLD_FIGHT
    //   COMBAT_FIELD *f;
    //   int pif=0;
    //   CharacterData cif=NULL;
    //   COMBAT_FIELD *f_next;
    //   int i,j;
    //   for (f=field_list;f!=NULL;f=f_next) {
    //      f_next=f->next;
    //      for (i=0;i<7;i++) {
    //         for (j=0; j<7; j++) {
    //            if (f->map[i][j]) {
    //               CharacterData c=f->map[i][j];
    //               cif=c;
    //               pif++;
    //               if (!c->fightInfoInternal) continue; /* ERROR */
    //               if ((--c->fightInfoInternal->field_ticks) == 0) {
    //                  if (c->fightInfoInternal->next_command==NULL && (IS_MOB(c) /*|| !IS_JAVA(c)*/ || c->fightInfoInternal->auto_toggles ||
    //                     (is_fighting_near(c,FIGHTING(c))!=-1 && c->fightInfoInternal->next_command==NULL))) { /* CHANGE AUTOS LATER */
    //                        if (is_fighting_near(c,FIGHTING(c))!=-1) {
    //                           field_move(c,is_fighting_near(c,FIGHTING(c)));
    //                        } else {
    //                           field_move(c,find_attack_direction(c,FIGHTING(c)));
    //                        }
    //                  } else {
    //                     if (c->fightInfoInternal->next_command) {
    //                        interpret(c,c->fightInfoInternal->next_command);
    //                     }
    //                  }
    //                  if (c->fightInfoInternal) {
    //                     c->fightInfoInternal->field_ticks=number_range(FIELD_TICK_WAIT-1,FIELD_TICK_WAIT+1);
    //                     if (nobody_near(c)) {
    //                        c->fightInfoInternal->field_ticks--;
    //                        if (IS_MOB(c) && number_range(1,2)==2) c->fightInfoInternal->field_ticks--;
    //                     }
    //                     /* Add speed-up enhancements here */
    //                     if (c->fightInfoInternal->next_command) {
    //                        java_cnc(c);
    //                        delete c->fightInfoInternal->next_command;
    //                     }
    //                     c->fightInfoInternal->next_command=NULL;
    //                  }
    //               }
    //            }
    //         }
    //      }		
    //      if (pif==1 && cif!=NULL && FIGHTING(cif)==NULL) {
    //         remove_from_combat_field_yes(cif);
    //      }
    //   }
    //#endif
    //   return;
    //}

    ///* Returns TRUE if chr will attack victim, FALSE if chr will just go for
    //target and ignore victim */
    //#ifndef OLD_FIGHT
    //bool good_hit(CharacterData chr, CharacterData victim) {
    //   if (IS_MOB(chr) && IS_PLAYER(victim)) return TRUE;
    //   if (not_is_same_align(chr,victim)) return TRUE;
    //   return FALSE;
    //}

    ///* Returns best direction for chr to attack victim */
    ///* 0,0      6,0 */
    ///*		*/
    ///* 0,6      6,6 */
    //int find_attack_direction(CharacterData chr, CharacterData victim) {
    //   COMBAT_FIELD *cf;
    //   int i,j,x,y;
    //   if (!victim) return -1;
    //   if (!chr->fightInfoInternal || !victim->fightInfoInternal) return -1;
    //   if ( (cf=chr->fightInfoInternal->field) == NULL ) return -1;
    //   if (cf!=victim->fightInfoInternal->field) return -1;
    //   i=chr->fightInfoInternal->pos_x;
    //   j=chr->fightInfoInternal->pos_y;
    //   x=victim->fightInfoInternal->pos_x;
    //   y=victim->fightInfoInternal->pos_y;
    //   if (i<x && j<y) {
    //      if (cf->map[i][j+1]!=NULL && cf->map[i][j+1]!=victim && !good_hit(chr,cf->map[i][j+1])) return DIR_NORTH;
    //      if (cf->map[i+1][j]!=NULL && cf->map[i+1][j]!=victim && !good_hit(chr,cf->map[i+1][j])) return DIR_WEST;
    //      return ((number_range(1,2)==2)?DIR_SOUTH:DIR_EAST);
    //   }
    //   if (i>x && j>y) {
    //      if (cf->map[i][j-1]!=NULL && cf->map[i][j-1]!=victim && !good_hit(chr,cf->map[i][j-1])) return DIR_EAST;
    //      if (cf->map[i-1][j]!=NULL && cf->map[i-1][j]!=victim && !good_hit(chr,cf->map[i-1][j])) return DIR_SOUTH;
    //      return ((number_range(1,2)==2)?DIR_NORTH:DIR_WEST);
    //   }
    //   if (i>x && j<y) {
    //      if (cf->map[i][j+1]!=NULL && cf->map[i][j+1]!=victim && !good_hit(chr,cf->map[i][j+1])) return DIR_NORTH;
    //      if (cf->map[i-1][j]!=NULL && cf->map[i-1][j]!=victim && !good_hit(chr,cf->map[i-1][j])) return DIR_EAST;
    //      return ((number_range(1,2)==2)?DIR_SOUTH:DIR_WEST);
    //   }
    //   if (i<x && j>y) {
    //      if (cf->map[i][j-1]!=NULL && cf->map[i][j-1]!=victim && !good_hit(chr,cf->map[i][j-1])) return DIR_SOUTH;
    //      if (cf->map[i+1][j]!=NULL && cf->map[i+1][j]!=victim && !good_hit(chr,cf->map[i+1][j])) return DIR_WEST;
    //      return ((number_range(1,2)==2)?DIR_NORTH:DIR_EAST);
    //   }
    //   if (i<x) {
    //      if (cf->map[i+1][j]!=NULL && cf->map[i+1][j]!=victim && !good_hit(chr,cf->map[i+1][j])) return ((number_range(1,2)==2)?DIR_NORTH:DIR_SOUTH);
    //      return DIR_EAST;
    //   }
    //   if (i>x) {
    //      if (cf->map[i-1][j]!=NULL && cf->map[i-1][j]!=victim && !good_hit(chr,cf->map[i-1][j])) return ((number_range(1,2)==2)?DIR_NORTH:DIR_SOUTH);
    //      return DIR_WEST;
    //   }
    //   if (j<y) {
    //      if (cf->map[i][j+1]!=NULL && cf->map[i][j+1]!=victim && !good_hit(chr,cf->map[i][j+1])) return ((number_range(1,2)==2)?DIR_EAST:DIR_WEST);
    //      return DIR_SOUTH;
    //   }
    //   if (j>y) {
    //      if (cf->map[i][j-1]!=NULL && cf->map[i][j-1]!=victim && !good_hit(chr,cf->map[i][j-1])) return ((number_range(1,2)==2)?DIR_EAST:DIR_WEST);
    //      return DIR_NORTH;
    //   }
    //   return -1;
    //}

    //int find_flee_direction(CharacterData chr, CharacterData victim) {
    //   COMBAT_FIELD *cf;
    //   int i,j,x,y;
    //   if (!chr->fightInfoInternal || !victim->fightInfoInternal) return -1;
    //   if ( (cf=chr->fightInfoInternal->field) == NULL ) return -1;
    //   if (cf!=victim->fightInfoInternal->field) return -1;
    //   i=chr->fightInfoInternal->pos_x;
    //   j=chr->fightInfoInternal->pos_y;
    //   x=victim->fightInfoInternal->pos_x;
    //   y=victim->fightInfoInternal->pos_y;
    //   if (i<x && j<y) return ((number_range(1,2)==2)?DIR_NORTH:DIR_WEST);
    //   if (i>x && j>y) return ((number_range(1,2)==2)?DIR_SOUTH:DIR_EAST);
    //   if (i>x && j<y) return ((number_range(1,2)==2)?DIR_NORTH:DIR_EAST);
    //   if (i<x && j>y) return ((number_range(1,2)==2)?DIR_SOUTH:DIR_WEST);
    //   if (i<x) return DIR_WEST;
    //   if (i>x) return DIR_EAST;
    //   if (j<y) return DIR_NORTH;
    //   if (j>y) return DIR_SOUTH;
    //   return -1;
    //}


    //COMBAT_FIELD *new_combat_field(void) {
    //   COMBAT_FIELD *cf;
    //   if (!free_field_list) {
    //      cf=new COMBAT_FIELD; //(sizeof(*cf));
    //   } else
    //   {
    //      cf=free_field_list;
    //      free_field_list=free_field_list->next;
    //   }
    //   bzero(cf,sizeof(*cf));
    //   cf->next=field_list;
    //   field_list=cf;
    //   return cf;
    //}

    //void free_combat_field(COMBAT_FIELD *cf) {
    //   COMBAT_FIELD *cc;
    //   if (cf==field_list) {
    //      field_list=field_list->next;
    //      cf->next=free_field_list;
    //      free_field_list=cf;
    //      return;
    //   }
    //   for (cc=field_list;cc!=NULL;cc=cc->next) {
    //      if (cc->next==cf) {
    //         cc->next=cf->next;
    //         cf->next=free_field_list;
    //         free_field_list=cf;
    //      }
    //   }
    //   /* Uh oh, not found.. don't worry about it */
    //   return;
    //}
    //#endif

    ///* ------------------------------------------------------------------------ */
    ///* Create a combat field if neither the char or victim is in one already */
    ///* If one is, use that one, place appropriately.  If both have a combat */
    ///* field, then something somewhere is messed up. */
    ///* Please note this only adds the character to the field */
    ///* ------------------------------------------------------------------------ */
    //void add_to_combat_field(CharacterData chr, CharacterData victim) {
    //#ifndef OLD_FIGHT
    //   int i,j;
    //   COMBAT_FIELD *cf;
    //   check_fgt(chr);
    //   if (!victim) {
    //      fprintf(stderr,"NULL victim in add to combat field.\n");
    //      return;
    //   }
    //   check_fgt(victim);
    //   if (chr->fightInfoInternal->field) return; /* This IS possible.. perhas give them notification? */
    //   if (chr->fightInfoInternal->field && chr->fightInfoInternal->field!=victim->fightInfoInternal->field) {
    //      /* We're screwed... char in combat field, but not the same as
    //      victim, or the victim isn't in one. */
    //      return;
    //   }
    //   chr->fightInfoInternal->field_ticks=number_range(2,5);
    //   if (victim->fightInfoInternal->field) {
    //      int xx,yy;
    //      xx=0;
    //      yy=0;
    //      cf=victim->fightInfoInternal->field;
    //      xx=victim->fightInfoInternal->pos_x;
    //      yy=victim->fightInfoInternal->pos_y;
    //      /* Place chr in victim's combat field */
    //      if (closeto && xx<6 && cf->map[xx+1][yy]==NULL) {
    //         cf->map[xx+1][yy]=chr;
    //         chr->fightInfoInternal->pos_x=xx+1;
    //         chr->fightInfoInternal->pos_y=yy;
    //         chr->fightInfoInternal->field=cf;
    //         java_add_to_field(chr->fightInfoInternal->field,chr,xx+1,yy);
    //         return;
    //      }
    //      if (closeto && xx>0 && cf->map[xx-1][yy]==NULL) {
    //         cf->map[xx-1][yy]=chr;
    //         chr->fightInfoInternal->pos_x=xx-1;
    //         chr->fightInfoInternal->pos_y=yy;
    //         chr->fightInfoInternal->field=cf;
    //         java_add_to_field(chr->fightInfoInternal->field,chr,xx-1,yy);
    //         return;
    //      }
    //      if (closeto && yy>0 && cf->map[xx][yy-1]==NULL) {
    //         cf->map[xx][yy-1]=chr;
    //         chr->fightInfoInternal->pos_x=xx;
    //         chr->fightInfoInternal->pos_y=yy-1;
    //         chr->fightInfoInternal->field=cf;
    //         java_add_to_field(chr->fightInfoInternal->field,chr,xx,yy-1);
    //         return;
    //      }
    //      if (closeto && yy<6 && cf->map[xx][yy+1]==NULL) {
    //         cf->map[xx][yy+1]=chr;
    //         chr->fightInfoInternal->pos_x=xx;
    //         chr->fightInfoInternal->pos_y=yy+1;
    //         chr->fightInfoInternal->field=cf;
    //         java_add_to_field(chr->fightInfoInternal->field,chr,xx,yy+1);
    //         return;
    //      }


    //      if (IS_MOB(chr)) {  /* Mob, place at top */
    //         for (i=0; i<7; i++) {
    //            for (j=0; j<7; j+=2) {
    //               if (cf->map[i][j]!=NULL) continue;
    //               cf->map[i][j]=chr;
    //               chr->fightInfoInternal->pos_x=i;
    //               chr->fightInfoInternal->pos_y=j;
    //               chr->fightInfoInternal->field=cf;
    //               java_add_to_field(chr->fightInfoInternal->field,chr,i,j);
    //               return;
    //            }
    //            for (j=1; j<7; j+=2) {
    //               if (cf->map[i][j]!=NULL) continue;
    //               cf->map[i][j]=chr;
    //               chr->fightInfoInternal->pos_x=i;
    //               chr->fightInfoInternal->pos_y=j;
    //               chr->fightInfoInternal->field=cf;
    //               java_add_to_field(chr->fightInfoInternal->field,chr,i,j);
    //               return;
    //            }
    //         }
    //         /* Holy shit.. no currentRoom in the WHOLE field - error here */
    //      } else
    //      {
    //         for (i=6; i>=0; i--) {
    //            for (j=5; j>=0; j-=2) {
    //               if (cf->map[i][j]!=NULL) continue;
    //               cf->map[i][j]=chr;
    //               chr->fightInfoInternal->pos_x=i;
    //               chr->fightInfoInternal->pos_y=j;
    //               chr->fightInfoInternal->field=cf;
    //               java_add_to_field(chr->fightInfoInternal->field,chr,i,j);
    //               return;
    //            }
    //            for (j=6; j>=0; j-=2) {
    //               if (cf->map[i][j]!=NULL) continue;
    //               cf->map[i][j]=chr;
    //               chr->fightInfoInternal->pos_x=i;
    //               chr->fightInfoInternal->pos_y=j;
    //               chr->fightInfoInternal->field=cf;
    //               java_add_to_field(chr->fightInfoInternal->field,chr,i,j);
    //               return;
    //            }
    //         }
    //         /* Holy shit.. no free space for this player.. error */
    //      }
    //   }
    //   /* Victim isn't in a combat field.. we have to make one. */
    //   cf=new_combat_field();
    //   if (IS_MOB(chr)) {
    //      i=2; j=0;
    //   } else
    //   {
    //      i=4; j=6;
    //   }
    //   chr->fightInfoInternal->pos_x=i;
    //   chr->fightInfoInternal->pos_y=j;
    //   chr->fightInfoInternal->field=cf;
    //   cf->map[i][j]=chr;
    //   java_add_to_field(chr->fightInfoInternal->field,chr,i,j);
    //   /* Don't place victim in the field yet... perhaps later? */
    //#endif
    //   return;
    //}

    //bool remove_from_combat_field_yes(CharacterData chr) { /* returns TRUE if 
    //                                                   nobody left on field */
    //#ifndef OLD_FIGHT
    //   int i,j;
    //   COMBAT_FIELD *cf;
    //   if (!chr->fightInfoInternal) return FALSE;
    //   cf=chr->fightInfoInternal->field;
    //   if (!cf) return FALSE;
    //   if (cf->map[chr->fightInfoInternal->pos_x][chr->fightInfoInternal->pos_y]!=chr) {
    //      /* Character not found at marked position! */
    //      return FALSE;
    //   }
    //   cf->map[chr->fightInfoInternal->pos_x][chr->fightInfoInternal->pos_y]=NULL;
    //   java_remove_from_combat_field(cf,chr,chr->fightInfoInternal->pos_x,chr->fightInfoInternal->pos_y);
    //   chr->fightInfoInternal->pos_x=0;
    //   chr->fightInfoInternal->pos_y=0;
    //   chr->fightInfoInternal->field=NULL;
    //   /* fprintf(stderr,"Removed %s from combat_field yes.\n",NAME(chr));
    //   */
    //   /* Now check if we can free the field */
    //   for (i=0; i<7; i++) {
    //      for (j=0; j<7; j++) {
    //         if (cf->map[i][j]!=NULL) return FALSE;
    //      }
    //   }
    //   /* Nobody left, let's free this baby */
    //   free_combat_field(cf);
    //   /*fprintf(stderr,"Free'd the combat field.\n");
    //   */
    //#endif
    //   return TRUE;
    //}




    //bool remove_from_combat_field(CharacterData chr) { /* returns TRUE if 
    //                                               nobody left on field */
    //#ifndef OLD_FIGHT
    //   int i,j;
    //   COMBAT_FIELD *cf;
    //   if (!chr->fightInfoInternal) return FALSE;
    //   cf=chr->fightInfoInternal->field;
    //   if (!cf) return FALSE;
    //   if (cf->map[chr->fightInfoInternal->pos_x][chr->fightInfoInternal->pos_y]!=chr) {
    //      /* Character not found at marked position! */
    //      return FALSE;
    //   }
    //   /* Now check if there are any others left chAttacking this bloke */
    //   for (i=0; i<7; i++) {
    //      for (j=0; j<7; j++) {
    //         if (!cf->map[i][j]) continue;
    //         if (cf->map[i][j]->inRoom != chr->inRoom) continue;
    //         if (cf->map[i][j]->position<=POSITION_STUNNED) continue;
    //         if (FIGHTING(cf->map[i][j])==chr) return FALSE;
    //      }
    //   }
    //   java_remove_from_combat_field(cf,chr,chr->fightInfoInternal->pos_x,chr->fightInfoInternal->pos_y);
    //   cf->map[chr->fightInfoInternal->pos_x][chr->fightInfoInternal->pos_y]=NULL;
    //   chr->fightInfoInternal->pos_x=0;
    //   chr->fightInfoInternal->pos_y=0;
    //   chr->fightInfoInternal->field=NULL;
    //   /* fprintf(stderr,"Removed %s from combat field.\n",NAME(chr));
    //   */
    //   /* Now check if we can free the field */
    //   for (i=0; i<7; i++) {
    //      for (j=0; j<7; j++) {
    //         if (cf->map[i][j]!=NULL) return FALSE;
    //      }
    //   }
    //   /* Nobody left, let's free this baby */
    //   free_combat_field(cf);
    //   /*fprintf(stderr,"Free'd the combat field.\n");
    //   */
    //#endif
    //   return TRUE;
    //}


    // OLD CODE to PORT: holy crap.. fightInfoInternal.c is a monster

    //void
    //do_tackle (CharacterData  chr, string szUserArguments)
    //{
    //  CharacterData victim;
    //  int chan;
    //  SINGLE_OBJECT *obj;
    //  int xn;
    //  char buf[STD_LENGTH];
    //  DEFINE_COMMAND ("tackle", do_tackle, POSITION_FIGHTING, 0, NORMAL, "This command makes your character attempt to tackle his/her opponent.")
    //    check_fgt (chr);
    ///*if (!FIGHTING(chr)) {
    //   send_to_char("You cannot start combat with a kick.  Use KILL instead.\n\r",chr);
    //   return;
    //   } */
    //  if (chr->fightInfoInternal->ears > 9)
    //    {
    //      send_to_char ("You can't tackle this soon after giving or recieving a bash.\n\r", chr);
    //      return;
    //    }
    //  chan = 0;
    //  if (chr->wait > 2)
    //    return;
    //  if (FIGHTING (chr) == NULL)
    //    {
    //      if (szUserArguments[0] == '\0' || szUserArguments == "")
    //   {
    //     send_to_char ("Tackle who?\n\r", chr);
    //     return;
    //   }
    //      if ((victim = get_char_room (chr, szUserArguments)) == NULL)
    //   {
    //     send_to_char ("Tackle who?\n\r", chr);
    //     return;
    //   }
    //      if (victim == chr)
    //   {
    //     send_to_char ("You really do look like an idiot!\n\r", chr);
    //     return;
    //   }
    //    }
    //  else
    //    victim = FIGHTING (chr);
    //  if (RIDING (chr) != NULL)
    //    {
    //      send_to_char ("You can't tackle someone when you are chRiding!\n\r", chr);
    //      return;
    //    }
    //  if (is_safe (chr, victim))
    //    {
    //      return;
    //    }
    //  if (FIGHTING (chr) != victim)
    //    {
    //      if (!pkill (chr, victim))
    //   return;
    //      check_pkill (chr, victim);
    //    }
    //  if (!can_see (chr, victim))
    //    {
    //      send_to_char ("How can you tackle someone you can't see!?\n\r", chr);
    //      return;
    //    }
    //  if (chr->position == POSITION_BASHED)
    //    {
    //      currentActionsAndBehavior ("You are bashed on the ground, how do you expect to tackle!?", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }
    //  if (chr->position == POSITION_GROUNDFIGHTING)
    //    {
    //      currentActionsAndBehavior ("You are on the ground; how do you expect to tackle $N?", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }
    //  if (!can_groundfight (victim))
    //    {
    //      currentActionsAndBehavior ("You do not want to tackle that kind of creature!", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }
    //  if (victim->position == POSITION_GROUNDFIGHTING)
    //    {
    //      currentActionsAndBehavior ("$N is already on the ground, tackled!", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }
    //  check_ced (chr);
    //  check_ced (victim);
    //  if (!(IS_IN_MELEE (chr, victim)))
    //    {
    //      send_to_char ("You are not in the main melee!\n\r", chr);
    //      return;
    //    }
    //  if (!pow.tackleWithWeapons)
    //    {
    //      for (obj = chr->carryingObjects; obj != NULL; obj = obj->next_content)
    //   if (obj->pIndexData->item_type == ITEM_WEAPON && (obj->wear_loc == WEAR_HOLD_1 ||
    //                     obj->wear_loc == WEAR_HOLD_2))
    //     {
    //       send_to_char ("You cannot tackle with a weapon in hand!\n\r", chr);
    //       return;
    //     }
    //    }
    //  if (!pow.tacklePersonWithWeapon)
    //    {
    //      for (obj = victim->carryingObjects; obj != NULL; obj = obj->next_content)
    //   if (obj->pIndexData->item_type == ITEM_WEAPON && (obj->wear_loc == WEAR_HOLD_1 ||
    //                     obj->wear_loc == WEAR_HOLD_2))
    //     {
    //       send_to_char ("Are you CRAZY!? Tackle someone with a weapon!??\n\r", chr);
    //       send_to_char ("You'd surely get whacked on your approach...\n\r", chr);
    //       return;
    //     }
    //    }

    //#ifndef OLD_FIGHT
    //  if (!chr->fightInfoInternal || is_fighting_near(chr,victim)==-1) {
    //   send_to_char("You must be next to that opponent to tackle him/her/it.\n\r",chr);
    //   return;
    //   }

    //  if (chr->fightInfoInternal && chr->fightInfoInternal->field_ticks>0) {
    //   char bb[STD_LENGTH];
    //   sprintf(bb, "tackle %s",szUserArguments);
    //   setnext(chr,bb);
    //   return;
    //   }
    //#endif



    //  if (IS_MOB (chr))
    //    chan = (LEVEL (chr) * 2) + 20;
    //  else
    //    chan = (get_curr_dex (chr) * 3) + (LEVEL (chr) * 2);
    //  chan -= (LEVEL (victim) * 2) + (IS_MOB (victim) ? 15 : 0);
    //  if (chan > 110)
    //    chan = 110;
    //  if (victim->ced && IS_SET (victim->ced->cmbatOptions, F_GROUND))
    //    xn = 150;
    //  else
    //    xn = 370;
    //  if ((number_range (0, xn) > chan && IS_AWAKE (victim)) || LEVEL (chr) < 12 || LEVEL (victim) < 12)
    //    {
    //      send_to_char ("You miss the tackle and almost fall on the ground!\n\r", chr);
    //      currentActionsAndBehavior ("$n tries to tackle you, but almost falls over instead!", chr, NULL, victim, TO_VICT);
    //      currentActionsAndBehavior ("$n misses a tackle at $N and almost falls over!", chr, NULL, victim, TO_NOTVICT);
    //      WAIT_STATE (chr, 4 * PULSE_VIOLENCE);
    //      if (FIGHTING (victim) == NULL)
    //   set_fighting (victim, chr);
    //      set_fighting (chr, victim);
    //      return;
    //    }
    //  check_ced (victim);
    //  check_ced (chr);
    //  victim->ced->grndfightPosition = 0;
    //  chr->ced->grndfightPosition = 0;
    //  NEW_POSITION(victim, POSITION_GROUNDFIGHTING);
    //  NEW_POSITION(chr, POSITION_GROUNDFIGHTING);
    //  if (RIDING (victim) != NULL)
    //    {
    //      sprintf (buf, "As you jump up and tackle $N, $S flies off of %s and lands hard on the ground!", PERS (RIDING (victim), chr));
    //      currentActionsAndBehavior (buf, chr, NULL, victim, TO_CHAR);
    //      sprintf (buf, "$n's flying tackle makes $N fall off of %s. $N lands on his back on the ground.", NAME (RIDING (victim)));
    //      currentActionsAndBehavior (buf, chr, NULL, victim, TO_NOTVICT);
    //      sprintf (buf, "You fall off of %s as $n tackles you!", PERS (RIDING (victim), victim));
    //      currentActionsAndBehavior (buf, chr, NULL, victim, TO_VICT);
    //      check_fgt (victim->fightInfoInternal->chRiding);
    //      victim->fightInfoInternal->chRiding->fightInfoInternal->chMountedBy = NULL;
    //      victim->fightInfoInternal->chRiding = NULL;
    //    }
    //  else if (RIDING (victim) == NULL)
    //    {
    //      currentActionsAndBehavior ("You tackle $N! The fight is taken to the ground!", chr, NULL, victim, TO_CHAR);
    //      currentActionsAndBehavior ("$n tackles $N and they both end up on the ground!", chr, NULL, victim, TO_NOTVICT);
    //      currentActionsAndBehavior ("$n tackles you! The fight is taken to the ground!", chr, NULL, victim, TO_VICT);
    //    }
    //  set_fighting (chr, victim);
    //  set_fighting (victim, chr);
    //  victim->fightInfoInternal->chAttacking = chr;
    //  chr->fightInfoInternal->chAttacking = victim;
    //  victim->ced->grndfightPosition = 0;
    //  chr->ced->grndfightPosition = 0;
    //  NEW_POSITION(victim, POSITION_GROUNDFIGHTING);
    //  NEW_POSITION(chr, POSITION_GROUNDFIGHTING);
    //  WAIT_STATE (victim, 3 * PULSE_VIOLENCE);
    //  WAIT_STATE (chr, (4 * PULSE_VIOLENCE));
    //  return;
    //}

    //void
    //violence_update (bool flaggy)
    //{
    //  CharacterData chr;
    //  CharacterData ch_next;
    //  CharacterData victim;
    //  CharacterData rch;
    //  CharacterData rch_next;
    //  int posorg;
    //  combat_state++;
    //  if (combat_state == 4)
    //    combat_state = 0;
    //  for (chr = f_first; chr != NULL; chr = ch_next)
    //    {
    //      if (chr->data_type==50) {
    //      fprintf(stderr,"That was it!\n");
    //      remove_from_fighting_list(chr);
    //      return;
    //      }
    //      if (FIGHTING(chr) && FIGHTING(chr)->data_type==50) {
    //   fprintf(stderr,"That was it2!\n");
    //   chr->fightInfoInternal->chAttacking=NULL;
    //   return;
    //   }
    //      ch_next = chr->next_fighting;
    //      check_fgt (chr);
    //      if (!chr->inRoom)
    //   continue;
    //      if (chr->position == POSITION_FIGHTING && !FIGHTING (chr))
    //   NEW_POSITION(chr, POSITION_STANDING);
    //      if (!flaggy)
    //   {
    //     if (IS_MOB (chr) && IS_SET (chr->pIndexData->act4, ACT4_FASTHUNT) && chr->fightInfoInternal && chr->fightInfoInternal->rgHunting != NULL && FIGHTING (chr) == NULL && chr->MPCurrent > 5 && chr->position == POSITION_STANDING)
    //       if (number_range (1, 3) == 2 && IS_MOB (chr))
    //         hunt_victim (chr);
    //     if (chr->fightInfoInternal->ears == 10)
    //       {
    //         chr->fightInfoInternal->ears = 2;
    //         if (chr->position == POSITION_BASHED)
    //      do_stand (chr, "");
    //       }
    //     else if (chr->fightInfoInternal->ears > 10)
    //       chr->fightInfoInternal->ears--;
    //     if (IS_MOB (chr) && FIGHTING (chr) == NULL && (IS_AFFECTED (chr, AFF_CHARM) /*|| (chr->npcdata->hire && chr->npcdata->hire!=NULL) */ ))
    //       {
    ///*                       if (chr->npcdata->hire!=NULL && chr->npcdata->hire->chAttacking!=NULL)
    //   multi_hit(chr,chr->npcdata->hire->chAttacking, TYPE_UNDEFINED); */
    //         if (IS_AFFECTED (chr, AFF_CHARM) && chr->fightInfoInternal->chMaster && chr->fightInfoInternal->chMaster != NULL && (chr->fightInfoInternal->chMaster->fightInfoInternal == NULL || chr->fightInfoInternal->chMaster->fightInfoInternal->chAttacking != NULL))
    //#ifdef OLD_FIGHT
    //      multi_hit (chr, chr->fightInfoInternal->chMaster->fightInfoInternal->chAttacking, TYPE_UNDEFINED);
    //#else
    //      set_fighting(chr,chr->fightInfoInternal->chMaster->fightInfoInternal->chAttacking);
    //#endif
    //       }
    //   }
    //      /*End if !flaggy */
    //      if ((victim = FIGHTING (chr)) == NULL)	/*Below applies to chAttacking only */
    //   continue;

    //      if (FIGHTING (victim) == NULL)
    //   {
    //     victim->fightInfoInternal->chAttacking = chr;
    //   }
    //      if (IS_AWAKE (chr) && chr->GetInRoom() == victim->inRoom)
    //   {
    //     if (!flaggy && IS_MOB (chr) && IS_SET (chr->pIndexData->act4, ACT4_MOBSWITCH))
    //       {
    //         CharacterData cir;
    //         int percent = 100;
    //         int count = -1;
    //         cir = chr->inRoom->MoreRoomInfo->people;
    //         while (cir != NULL)
    //      {
    //        cir = cir->next_in_room;
    //        count++;
    //      }
    //         if (count != 0)
    //      percent = 100 / count;
    //         for (cir = chr->inRoom->MoreRoomInfo->people; cir != NULL; cir = cir->next_in_room)
    //      {
    //        if (FIGHTING (cir) == chr && (number_percent () <= percent) && FIGHTING (chr) != cir)
    //          {
    //            currentActionsAndBehavior ("$n turns and attacks $N!", chr, NULL, cir, TO_NOTVICT);
    //            currentActionsAndBehavior ("$n turns towards you and attacks!", chr, NULL, cir, TO_CHAR);
    //            set_fighting (chr, cir);
    //            break;
    //          }
    //      }
    //       }
    //     posorg = victim->position;
    //     if (chr->fightInfoInternal->challenge == 10 && number_range (1, 9) == 2)
    //       {
    //         char bufr[STD_LENGTH];
    //         sprintf (bufr, "($B$1Arena$N$7) $B%s: $4%s $7%s: $4%s", NAME (chr), STRING_HITS (chr), NAME (victim), STRING_HITS (victim));
    //         do_arenaecho (chr, bufr, TRUE);
    //       }
    //     if (chr != victim && chr->position == POSITION_GROUNDFIGHTING && victim->position == POSITION_GROUNDFIGHTING)
    //       {
    //         if (!flaggy)
    //      ground_hit (chr, victim, TYPE_UNDEFINED);
    //       }
    //     else if (chr->position != POSITION_CASTING)
    //       {
    //         if (chr->fightInfoInternal->challenge == 10 && number_range (1, 6) == 2)
    //      {
    //        char buf[STD_LENGTH];
    //        int i;
    //        i = number_range (1, 5);
    //        if (i == 1)
    //          sprintf (buf, "($B$1Arena$N$7) $BBlood runs freely as %s and %s exchange blows.", NAME (chr), NAME (victim));
    //        if (i == 2)
    //          sprintf (buf, "($B$1Arena$N$7) $BThe two fighters circle, flailing at each other wildly.");
    //        if (i == 3)
    //          sprintf (buf, "($B$1Arena$N$7) $BPieces of flesh fly everywhere as blows are exchanged.");
    //        if (i == 4)
    //          sprintf (buf, "($B$1Arena$N$7) $B%s lets out a loud warcry before attacking!", NAME (chr));
    //        if (i == 5)
    //          sprintf (buf, "($B$1Arena$N$7) $BYou can almost hear the crunching of bones...");
    //        do_arenaecho (chr, buf, TRUE);
    //      }
    //         if (IS_MOB (chr) && chr->pIndexData && chr->pIndexData->opt)
    //      {
    //        if (number_range (1, 101) < chr->pIndexData->opt->warriorPercent)
    //          {
    //            int cnt = 0;
    //            if (chr->pIndexData->opt->flurries)
    //         cnt++;
    //            if (chr->pIndexData->opt->tackles)
    //         cnt++;
    //            if (chr->pIndexData->opt->kicks)
    //         cnt++;
    //            if (number_range (1, cnt) == 1 && chr->pIndexData->opt->flurries &&
    //           chr->MPCurrent > 40)
    //         {
    //           do_flurry (chr, "");
    //         }
    //            else if (number_range (1, cnt) == 1 && chr->pIndexData->opt->tackles)
    //         {
    //           do_tackle (chr, "");
    //         }
    //            else if (number_range (1, cnt) == 1 && chr->pIndexData->opt->kicks)
    //         {
    //           do_kick (chr, "");
    //         }
    //          }
    //        else
    //          {
    //            if (number_range (1, 101) < chr->pIndexData->opt->castPercent)
    //         {
    //           int iil;
    //           int cnt = 0;
    //           for (iil = 0; iil < 10; iil++)
    //             if (chr->pIndexData->opt->castSpells[iil] != NULL)
    //               cnt++;
    //           for (iil = 0; iil < 10; iil++)
    //             {
    //               if (number_range (1, cnt) == 1 && chr->pIndexData->opt->castSpells[iil] != NULL)
    //            {
    //              SPELL_DATA *spl;
    //              if ((spl = skill_lookup (chr->pIndexData->opt->castSpells[iil], -1)) == NULL)
    //                continue;
    //              if (LEVEL (chr) < spl->spellLevel)
    //                continue;
    //              if (spl->spell_type == TAR_CHAR_DEFENSIVE ||
    //                  spl->spell_type == TAR_CHAR_SELF)
    //                {
    //                  general_spell (spl, LEVEL (chr), chr, chr);
    //                }
    //              else
    //                general_spell (spl, LEVEL (chr), chr, victim);
    //              break;
    //            }
    //             }
    //         }
    //          }
    //      }
    //#ifdef OLD_FIGHT
    //         if (pow.oldAttack)
    //      {
    //        multi_hit (chr, victim, TYPE_UNDEFINED);
    //      }
    //         else
    //#endif

    //if (!flaggy)
    //      {
    //        if (FIGHTING (chr) && FIGHTING (FIGHTING (chr)) == chr && !chr->fightInfoInternal->attacker_turn)
    //          continue;
    //        if (FIGHTING (chr) && FIGHTING (FIGHTING (chr)) != chr && number_range (1, 2) == 2)
    //          continue;
    //#ifdef OLD_FIGHT
    //        multi_hit (chr, victim, TYPE_UNDEFINED);
    //#endif
    //      }
    //         else
    //      {
    //        /*if (chr->fightInfoInternal->attacks<2) continue; */
    //        chr->fightInfoInternal->attacks = 0;
    //#ifdef OLD_FIGHT
    //        multi_hit (chr, victim, TYPE_UNDEFINED + 20000); 
    //#endif
    //        chr->fightInfoInternal->attacks = 1;
    //      }
    //       }
    //     if (posorg == POSITION_CASTING && victim->position != POSITION_CASTING)
    //       {
    //         send_to_char ("OUCH! You just lost your concentration!\n\r", victim);
    //         if (IS_PLAYER (victim))
    //      victim->pcdata->tickcounts = 0;
    //       }
    //   }
    //      else
    //   stop_fighting (chr, FALSE);
    //      if ((victim = FIGHTING (chr)) == NULL)
    //   continue;
    //      for (rch = chr->inRoom->MoreRoomInfo->people; rch != NULL; rch = rch_next)
    //   {
    //     rch_next = rch->next_in_room;
    //     if (IS_AWAKE (rch) && FIGHTING (rch) == NULL)
    //       {
    //         if (IS_PLAYER (chr) || IS_AFFECTED (chr, AFF_CHARM))
    //      {
    //        if ((IS_PLAYER (rch) || IS_AFFECTED (rch, AFF_CHARM)) && is_same_group (chr, rch) && IS_SET (rch->pcdata->act2, PLR_ASSIST) && !IN_BATTLE (rch) && !IN_BATTLE (chr) && FIGHTING (chr) != NULL && IS_MOB (FIGHTING (chr)) && rch->position == POSITION_STANDING && (!chr->ced || chr->HPCurrent > chr->ced->fleeWhenHPBelow))
    //          {
    //            currentActionsAndBehavior ("You join the fight!", rch, NULL, rch, TO_CHAR);
    //            currentActionsAndBehavior ("$n joins the fight!", rch, NULL, rch, TO_ROOM);
    //#ifdef OLD_FIGHT
    //            multi_hit (rch, victim, TYPE_UNDEFINED);
    //#endif
    //         set_fighting(rch,victim);
    //          }
    //        continue;
    //      }
    //         if (IS_MOB (rch) && !IS_AFFECTED (rch, AFF_CHARM))
    //      {
    //        if (rch->pIndexData == chr->pIndexData)
    //          {
    //            CharacterData vch;
    //            CharacterData target;
    //            int number;
    //            target = NULL;
    //            number = 0;
    //            for (vch = chr->inRoom->MoreRoomInfo->people; vch; vch = vch->next)
    //         {
    //           if (can_see (rch, vch)
    //               && is_same_group (vch, victim)
    //               && number_range (0, number) == 0)
    //             {
    //               target = vch;
    //               number++;
    //             }
    //         }
    //            if (target != NULL)
    //         {
    //           if (LEVEL (rch) > 6 && FIGHTING (rch) == NULL && can_see (rch, target))
    //             {
    //               check_fgt (rch);
    //               rch->fightInfoInternal->chAttacking = target;
    //               NEW_POSITION(rch, POSITION_FIGHTING);
    //               currentActionsAndBehavior ("$n CHARGES into battle!", rch, NULL, NULL, TO_ROOM);
    //#ifdef OLD_FIGHT
    //               multi_hit (rch, target, TYPE_UNDEFINED);
    //#else
    //            set_fighting(rch,target);
    //#endif
    //             }
    //         }
    //          }
    //      }
    //       }
    //   }
    //    }
    //  if (!flaggy && !pow.oldAttack)
    //    {
    //      CharacterData rch_next;
    //      for (rch = f_first; rch != NULL; rch = rch_next)
    //   {
    //     rch_next = rch->next_fighting;
    //     check_fgt (rch);
    //     if (rch->fightInfoInternal->chAttacking)
    //       check_fgt (rch->fightInfoInternal->chAttacking);
    //     if (FIGHTING (rch) == NULL || (rch->fightInfoInternal->upd && !rch->fightInfoInternal->chAttacking->fightInfoInternal->upd))
    //       continue;
    //     if (FIGHTING (FIGHTING (rch)) && FIGHTING (FIGHTING (rch)) == rch)
    //       {
    //         rch->fightInfoInternal->upd = FALSE;
    //         rch->fightInfoInternal->chAttacking->fightInfoInternal->upd = TRUE;
    //         if (rch->fightInfoInternal->attacker_turn && rch->fightInfoInternal->chAttacking->fightInfoInternal->attacker_turn)
    //      rch->fightInfoInternal->attacker_turn = FALSE;
    //         else if (!rch->fightInfoInternal->attacker_turn && !rch->fightInfoInternal->chAttacking->fightInfoInternal->attacker_turn)
    //      rch->fightInfoInternal->attacker_turn = TRUE;
    //         else if (rch->fightInfoInternal->attacker_turn)
    //      {
    //        rch->fightInfoInternal->attacker_turn = FALSE;
    //        rch->fightInfoInternal->chAttacking->fightInfoInternal->attacker_turn = TRUE;
    //      }
    //         else if (!rch->fightInfoInternal->attacker_turn)
    //      {
    //        rch->fightInfoInternal->attacker_turn = TRUE;
    //        rch->fightInfoInternal->chAttacking->fightInfoInternal->attacker_turn = FALSE;
    //      }
    //       }
    //   }
    //    }
    //  return;
    //}

    //void
    //do_circle (CharacterData  chr, string szUserArguments)
    //{
    //  SINGLE_OBJECT *obj;
    //  int dt;
    //  SPELL_DATA *spl;
    //  DEFINE_COMMAND ("circle", do_circle, POSITION_FIGHTING, 0, NORMAL, "This command allows you to circle behind an opponent (who isn't chAttacking you), and thrust a dagger in his/her/its back during combat.")
    //    check_fgt (chr);
    //  if ((spl = skill_lookup ("Circle", -1)) == NULL)
    //    {
    //      send_to_char ("Huh?\n\r", chr);
    //      return;
    //    }
    //  if (chr->fightInfoInternal->ears > 9)
    //    {
    //      send_to_char ("You can't circle this soon after giving or recieving a bash.\n\r", chr);
    //      return;
    //    }
    //  if (IS_MOB (chr))
    //    return;
    //  if (chr->pcdata->tickcounts > 3)
    //    {
    //      send_to_char ("You are off-balance from your last maneuver; you can't circle at the moment.\n\r", chr);
    //      return;
    //    }
    //  if (chr->wait > 1)
    //    return;
    //  if (chr->position != POSITION_FIGHTING)
    //    return;
    //  if (FIGHTING (chr) == NULL)
    //    return;
    //  if (FIGHTING (FIGHTING (chr)) == NULL)
    //    return;
    //  if (FIGHTING (FIGHTING (chr)) == chr)
    //    {
    //      send_to_char ("You can't circle around behind the mob who is chAttacking you!\n\r", chr);
    //      return;
    //    }
    //  if (chr->pcdata->learned[gsn_circle] < 2)
    //    {
    //      send_to_char ("You do not know how to circle an opponent!\n\r", chr);
    //      return;
    //    }
    //  if ((obj = get_item_held (chr, ITEM_WEAPON)) == NULL)
    //    {
    //      send_to_char ("You need to wield a weapon.\n\r", chr);
    //      return;
    //    }
    //  dt = ((I_WEAPON *) obj->MoreRoomInfo)->attack_type;
    //  if (attack_table[dt].hit_type != TYPE_PIERCE)
    //    {
    //      send_to_char ("You need to wield a piercing weapon.\n\r", chr);
    //      return;
    //    }
    //  if (FIGHTING (chr)->position == POSITION_GROUNDFIGHTING)
    //    {
    //      send_to_char ("That person is entangled in mortal combat on the ground!!\n\r", chr);
    //      return;
    //    }
    //  check_ced (chr);
    //  check_ced (FIGHTING (chr));
    //  if (!(IS_IN_MELEE (chr, FIGHTING (chr))))
    //    {
    //      send_to_char ("You aren't on the front lines of that battle!\n\r", chr);
    //      return;
    //    }
    //  send_to_char ("You attempt to circle around your victim...\n\r", chr);
    //  chr->pcdata->tickcounts = spl->mana;	/*13; */
    ///*
    //   currentActionsAndBehavior("$n begins to circle behind $s victim...",chr,NULL,chr,TO_ROOM);
    // */
    //  NEW_POSITION(chr, POSITION_CIRCLE);
    //  return;
    //}

    //void
    //do_actual_circle (CharacterData  chr, string szUserArguments)
    //{
    //  SINGLE_OBJECT *obj;
    //  int dt;
    //  CharacterData c;
    //  DESCRIPTOR_DATA *d;
    //  SPELL_DATA *spl;
    //  if (IS_MOB (chr))
    //    return;
    //  if (chr->wait > 1)
    //    return;
    //  if (FIGHTING (chr) == NULL)
    //    return;
    //  if (FIGHTING (FIGHTING (chr)) == NULL)
    //    return;
    //  if (chr->position != POSITION_CIRCLE)
    //    return;
    //  NEW_POSITION(chr, POSITION_STANDING);
    //  if (IS_PLAYER (chr))
    //    skill_gain (chr, gsn_circle, TRUE);
    //  if ((spl = skill_lookup ("Circle", -1)) == NULL)
    //    {
    //      send_to_char ("Huh?\n\r", chr);
    //      return;
    //    }
    //  if (FIGHTING (FIGHTING (chr)) == chr)
    //    {
    //      send_to_char ("You can't circle around behind the mob who is chAttacking you!\n\r", chr);
    //      return;
    //    }
    //  if (chr->pcdata->learned[gsn_circle] < 2)
    //    {
    //      send_to_char ("You do not know how to circle an opponent!\n\r", chr);
    //      return;
    //    }
    //  if ((obj = get_item_held (chr, ITEM_WEAPON)) == NULL)
    //    {
    //      send_to_char ("You need to wield a weapon.\n\r", chr);
    //      return;
    //    }
    //  dt = ((I_WEAPON *) obj->MoreRoomInfo)->attack_type;
    //  if (attack_table[dt].hit_type != TYPE_PIERCE)
    //    {
    //      send_to_char ("You need to wield a piercing weapon.\n\r", chr);
    //      return;
    //    }
    //  if (FIGHTING (chr)->position == POSITION_GROUNDFIGHTING)
    //    {
    //      send_to_char ("That person is entangled in mortal combat on the ground!!\n\r", chr);
    //      return;
    //    }
    //  for (d = descriptor_list; d != NULL; d = d->next)
    //    {
    //      if (!d->character || d->connected != PLAYING)
    //   continue;
    //      c = d->character;
    //      if (FIGHTING (c) == FIGHTING (chr) && c->position == POSITION_CIRCLE)
    //   {
    //     currentActionsAndBehavior ("$B$4You bump into $N, who is also trying to circle at the same time!", chr, NULL, c, TO_CHAR);
    //     currentActionsAndBehavior ("$B$4$n bumps into $N, who are both trying to circle at the same time!  What fools!", chr, NULL, c, TO_NOTVICT);
    //     currentActionsAndBehavior ("$B$4$n bumps into you as you both crowd behind the same mob, trying to circle!", chr, NULL, c, TO_VICT);
    //     NEW_POSITION(c, POSITION_FIGHTING);
    //     free_temp (c);
    //     SUBHIT(c,4);
    //     SUBHIT(chr,5);
    //     return;
    //   }
    //    }
    //  if (number_range (0, 110) < chr->pcdata->learned[gsn_circle])
    //    {
    //      set_fighting (FIGHTING (chr), chr);
    //      set_fighting (chr, FIGHTING (chr));
    //      if (IS_PLAYER (chr))
    //   chr->pcdata->tickcounts = spl->casting_time;
    //      multi_hit (chr, FIGHTING (chr), gsn_circle);
    //    }
    //  else
    //    send_to_char ("You failed to circle your opponent.\n\r", chr);
    //  return;
    //}

    //void
    //check_pkill (CharacterData  chr, CharacterData  victim)
    //{
    //  if (CHALLENGE (chr) == 10 || (IN_BATTLE (chr)))
    //    return;
    //  return;
    //}

    //void
    //multi_hit (CharacterData  chr, CharacterData  victim, int dt)
    //{
    //  int chance;
    //  int gmembers;
    //  bool cons;
    //  bool castsp = FALSE;
    //  bool second;
    //  SINGLE_OBJECT *action_object = NULL;
    //  CharacterData vch;
    //  SINGLE_OBJECT *wield;
    //  cons = FALSE;
    //  second = FALSE;
    //  CHECK_CHAR (chr);
    //  CHECK_CHAR (victim);
    //  check_fgt (chr);
    //  check_fgt (victim);
    //  using_weapon = FALSE;
    //  using_shield = FALSE;
    ///* Not in same currentRoom */
    //if (chr->inRoom != victim->inRoom) {
    //   chr->fightInfoInternal->chAttacking=NULL;
    //   victim->fightInfoInternal->chAttacking=NULL;
    //   chr->position=POSITION_STANDING;
    //   victim->position=POSITION_STANDING;
    //   return;
    //}
    //  if (dt > 19000)
    //    {
    //      dt -= 20000;		/*second=TRUE; */
    //    }
    //  if (dt > 8000)
    //    {
    //      dt -= 10000;
    //      cons_damage = 0;
    //      cons = TRUE;
    //    }
    //  if (!cons)
    //    {
    //      /*AM I JUST CONSIDERING THE BATTLE? */
    //      check_ced (chr);
    //      check_ced (victim);
    //      add_to_fighting_list (chr);
    //      add_to_fighting_list (victim);
    //      if (!FIGHTING(victim)) {
    //      closeto=TRUE;
    //      set_fighting(victim,chr);
    //      }
    //      if (!FIGHTING(chr)) {
    //      closeto=TRUE;
    //      set_fighting(chr,victim);
    //      }
    //      closeto=FALSE;

    //      if (IS_MOB (victim) && victim && IS_SET (victim->currentActionsAndBehavior, ACT_UNTOUCHABLE))
    //   {
    //     send_to_char ("Your physical attacks don't seem to hurt this creature!\n\r", chr);
    //     return;
    //   }
    //      if (chr->position == POSITION_SLEEPING)
    //   return;
    //      if (victim == NULL)
    //   return;
    //      if (victim->GetInRoom() == NULL || chr->GetInRoom() == NULL)
    //   return;
    ///* Kill self capabilities here */
    //if (pow.canFightSelf) {
    //      if (IS_PLAYER (chr) && chr->description != NULL && FIGHTING (chr) == NULL)
    //   {
    //     dd.SendTelnetCommand (chr->description, "\n\r", 2);
    //     chr->fightInfoInternal->chAttacking = victim;
    //   }
    //      else
    //   {
    //     check_fgt (chr);
    //     chr->fightInfoInternal->chAttacking = victim;
    //   }
    //}
    //      if (FIGHTING (FIGHTING (chr)) == NULL)
    //   {
    //     chr->ced->attackersInternal[0] = victim;
    //     victim->ced->attackersInternal[0] = chr;
    //   }
    //      if (chr == FIGHTING (victim) && !(IS_IN_MELEE (chr, victim)))
    //   {
    //     /*victim is being HPCurrent, but not in melee?? */
    //     victim->ced->attackersInternal[0] = chr;	/*Set him in position 1 attacking */
    //   }
    //      for (vch = victim->inRoom->MoreRoomInfo->people; vch != NULL; vch = vch->next_in_room)
    //   {
    //     if (FIGHTING (vch) == victim)
    //       {
    //         check_ced (vch);
    //         if (!IS_IN_MELEE (vch, victim))
    //      {
    //        for (gmembers = 0; gmembers < 4; gmembers++)
    //          {
    //            if (victim->ced->attackersInternal[gmembers] == NULL ||
    //           victim->ced->attackersInternal[gmembers]->inRoom != victim->inRoom)
    //         {
    //           victim->ced->attackersInternal[gmembers] = vch;
    //           break;
    //         }
    //          }
    //      }
    //       }
    //   }
    //      if (dt != gsn_backstab && !IS_IN_MELEE (chr, victim))
    //   {
    //     send_to_char ("\x1B[35;1m<-> (\x1B[32mYou are not within melee range\x1B[35m) <->\x1B[37;0m\n\r", chr);
    //     return;
    //   }
    //      if (chr->position <= POSITION_STUNNED && chr->position >= 0)
    //   return;
    //      if (victim->position == POSITION_DEAD)
    //   {
    //     stop_fighting (chr, TRUE);
    //     chr->wait = 0;
    //     stop_fighting (victim, TRUE);
    //   }
    //      if (is_safe (chr, victim))
    //   {
    //     return;
    //   }
    //      if (!second)
    //   {
    //     if (chr->fightInfoInternal->combat_delay_count <= -5)
    //       {
    //         chr->fightInfoInternal->combat_delay_count--;
    //         if (chr->fightInfoInternal->combat_delay_count < -8)
    //      chr->fightInfoInternal->combat_delay_count = -1;
    //       }
    //     if (chr->fightInfoInternal->combat_delay_count > 0)
    //       {
    //         chr->fightInfoInternal->combat_delay_count--;
    //         return;
    //       }
    //     if (chr->position != POSITION_BASHED && chr->fightInfoInternal->combat_delay_count == 0)
    //       {
    //         chr->fightInfoInternal->combat_delay_count = -1;
    //         send_to_char ("You scramble to your feet!\n\r", chr);
    //         currentActionsAndBehavior ("$n stands up quickly, trying not to get whacked again!", chr, NULL, NULL, TO_ROOM);
    //         NEW_POSITION(chr, POSITION_FIGHTING);
    //       }
    //     if (IS_MOB (chr) && chr->position == POSITION_BASHED && chr->fightInfoInternal->combat_delay_count < 1)
    //       {
    //         chr->fightInfoInternal->combat_delay_count = -5;
    //         send_to_char ("You scramble to your feet!\n\r", chr);
    //         currentActionsAndBehavior ("$n stands up, trying not to get bashed down again!", chr, NULL, NULL, TO_ROOM);
    //         NEW_POSITION(chr, POSITION_FIGHTING);
    //       }
    //     if (chr->position == POSITION_BASHED)
    //       {
    //         update_pos (chr);
    //         return;
    //       }
    //     if (chr->fightInfoInternal->combat_delay_count < 1 && chr->position == POSITION_STANDING)
    //       {
    //         NEW_POSITION(chr, POSITION_FIGHTING);
    //       }
    //     if (number_range (1, 40) == 3 && RIDING (chr) == NULL && chr->HPCurrent > 15 && victim->HPCurrent > 15 &&
    //         !IS_AFFECTED (chr, AFF_FLYING) &&
    //         can_groundfight (chr) && can_groundfight (victim) && (chr->HPCurrent * (double) 1.7 <
    //          chr->HPMax || victim->HPCurrent * (double) 1.7 < victim->HPMax))
    //       {
    //         if (number_range (1, 2) == 1 || !IS_SET (chr->ced->cmbatOptions, F_GROUND) ||
    //        !IS_SET (victim->ced->cmbatOptions, F_GROUND) ||
    //        LEVEL (chr) < 10 || LEVEL (victim) < 10 || victim->position == POSITION_GROUNDFIGHTING
    //        || chr->position == POSITION_GROUNDFIGHTING || FIGHTING (victim) != chr)
    //      {
    //        currentActionsAndBehavior ("You slip on a pool of blood that has formed on the ground here!\n\rYou HPCurrent your head hard as your face meets the ground!", chr, NULL, victim, TO_CHAR);
    //        currentActionsAndBehavior ("$n slips on a pool of blood and falls on $s face!", chr, NULL, victim, TO_ROOM);
    //        SUBHIT(chr,(7 + (UMIN (10, LEVEL (chr) / 7))));
    //        WAIT_STATE (chr, PULSE_VIOLENCE);
    //        return;
    //      }
    //         else
    //      {
    //        currentActionsAndBehavior ("You slip on some blood and $N falls on top of you!", chr, NULL, victim, TO_CHAR);
    //        currentActionsAndBehavior ("$n slips on some blood and drags $N down too!", chr, NULL, victim, TO_NOTVICT);
    //        currentActionsAndBehavior ("$n slips on a pool of blood on the ground, but as $n\n\rgoes down, $n grabs you, taking you down too!", chr, NULL, victim, TO_VICT);
    //        currentActionsAndBehavior ("The fight is taken to the ground!", chr, NULL, victim, TO_ROOM);
    //        currentActionsAndBehavior ("The fight is taken to the ground!", chr, NULL, victim, TO_CHAR);
    //             NEW_POSITION(chr, POSITION_GROUNDFIGHTING);
    //             NEW_POSITION(victim, POSITION_GROUNDFIGHTING);
    //        WAIT_STATE (chr, PULSE_VIOLENCE);
    //        WAIT_STATE (victim, PULSE_VIOLENCE);
    //        return;
    //      }
    //       }
    //   }
    //      /*End if !second */
    //    }
    ///*End is considering */
    //  if (victim)
    //    {
    //      SINGLE_OBJECT *o;
    //      for (o = victim->carryingObjects; o != NULL; o = o->next_content)
    //   {
    //     if (o->wear_loc == WEAR_HOLD_1 && o->pIndexData->item_type == ITEM_WEAPON)
    //       {
    //         using_weapon = TRUE;
    //       }
    //     if (o->wear_loc == WEAR_HOLD_2 && o->pIndexData->item_type == ITEM_WEAPON)
    //       {
    //         using_weapon = TRUE;
    //       }
    //     if (o->wear_loc == WEAR_SHIELD)
    //       {
    //         using_shield = TRUE;
    //       }
    //   }
    //    }

    //  if (dt == gsn_backstab || dt == gsn_circle)
    //    {
    //      SINGLE_OBJECT *wield1;
    //      SINGLE_OBJECT *wield2;
    //      wield1 = get_eq_char (chr, WEAR_HOLD_1);
    //      wield2 = get_eq_char (chr, WEAR_HOLD_2);
    //      if (wield1 && wield1->pIndexData->item_type == ITEM_WEAPON && IS_SET (wield1->extra_flags, ITEM_PIERCE))
    //   {
    //     one_hit (chr, victim, dt, wield1, cons);
    //   }
    //      else if (wield2 && wield2->pIndexData->item_type == ITEM_WEAPON && IS_SET (wield2->extra_flags, ITEM_PIERCE))
    //   {
    //     one_hit (chr, victim, dt, wield2, cons);
    //   }
    //      return;
    //    }
    //  if (dt == TYPE_UNDEFINED)
    //    {
    //      SINGLE_OBJECT *o;
    //      SINGLE_OBJECT *wield1 = NULL;
    //      SINGLE_OBJECT *wield2 = NULL;
    //      if (IS_MOB (chr) && (chr->pIndexData->mobtype == DUMMY))
    //   return;

    //      for (o = chr->carryingObjects; o != NULL; o = o->next_content)
    //   {
    //     if (!cons && !action_object)
    //       {
    //         if (o->wear_loc > WEAR_NONE && o->wear_loc != WEAR_BELT_1 &&
    //         o->wear_loc != WEAR_BELT_2 && o->pIndexData->values_2[0] > 0 &&
    //        number_range (1, 1000) < o->pIndexData->values_2[1])
    //      {
    //        action_object = o;
    //      }
    //         if (o->wear_loc > WEAR_NONE && o->wear_loc != WEAR_BELT_1 &&
    //         o->wear_loc != WEAR_BELT_2 && o->pIndexData->values_2[2] > 0 &&
    //        number_range (1, 1000) < o->pIndexData->values_2[3])
    //      {
    //        action_object = o;
    //        castsp = TRUE;
    //      }
    //       }
    //     if (o->wear_loc == WEAR_HOLD_1 && o->pIndexData->item_type == ITEM_WEAPON)
    //       {
    //         wield1 = o;
    //       }
    //     if (o->wear_loc == WEAR_HOLD_2 && o->pIndexData->item_type == ITEM_WEAPON)
    //       {
    //         wield2 = o;
    //       }
    //   }


    //      if (IS_MOB (victim) && (victim->pIndexData->mobtype == GHOST))
    //   {
    //     bool can_hit_it;
    //     can_hit_it = FALSE;
    //     if (wield1 && (IS_OBJ_STAT (wield1, ITEM_GLOW) || IS_OBJ_STAT (wield1, ITEM_HUM)))
    //       can_hit_it = TRUE;
    //     if (wield2 && (IS_OBJ_STAT (wield2, ITEM_GLOW) || IS_OBJ_STAT (wield2, ITEM_HUM)))
    //       can_hit_it = TRUE;
    //     if (!can_hit_it)
    //       {
    //         if (!cons)
    //      {
    //        send_to_char ("Your attack goes right through your victim as if it was not there!\n\r", chr);
    //        return;
    //      }
    //       }
    //   }
    //      if (wield1 && IS_AFFECTED_EXTRA (chr, AFF_SPEED))
    //   {
    //     if (number_range (1, 100) < ((get_curr_dex (chr) - 4) * 2))
    //       {
    //         one_hit (chr, victim, dt, wield1, cons);
    //       }
    //   }
    //      if (wield1)
    //   {
    //     one_hit (chr, victim, dt, wield1, cons);
    //     if (wield2 && ((IS_PLAYER (chr) &&
    //      chr->pcdata->learned[gsn_dual_wield] > number_range (0, 148))
    //        || ((IS_MOB (chr)) && number_range (1, 120) < LEVEL (chr))))
    //       {
    //         if (wield2)
    //      {
    //        one_hit (chr, victim, dt, wield2, cons);
    //      }
    //       }
    //   }
    //      else if (wield2 != NULL)
    //   {
    //     one_hit (chr, victim, dt, wield2, cons);
    //   }
    //      else
    //   {
    //     one_hit (chr, victim, TYPE_HIT, NULL, cons);
    //   }
    //      if (FIGHTING (chr) != victim || dt == gsn_backstab || dt == gsn_circle)
    //   return;
    //      wield = (wield1 ? wield1 : wield2);
    //      if (second)
    //   {
    //     chance = 0;
    //   }
    //      else
    //   chance = IS_MOB (chr) ? LEVEL (chr) / 3 : ((chr->pcdata->learned[gsn_second_attack] / 4) + LEVEL (chr) / 4);
    //      if (number_percent () < chance)
    //   {
    //     if (wield)
    //       one_hit (chr, victim, dt, wield, cons);
    //     else
    //       one_hit (chr, victim, TYPE_HIT, NULL, cons);
    //     if (IS_PLAYER (chr) && !cons)
    //       skill_gain (chr, gsn_second_attack, TRUE);
    //     if (FIGHTING (chr) != victim)
    //       return;
    //   }
    //      if (second)
    //   chance = 0;
    //      else
    //   chance = IS_MOB (chr) ? LEVEL (chr) / 6 : chr->pcdata->learned[gsn_third_attack] / 7;
    //      if (number_percent () < chance)
    //   {
    //     if (wield)
    //       one_hit (chr, victim, dt, wield, cons);
    //     else
    //       one_hit (chr, victim, TYPE_HIT, NULL, cons);
    //     if (IS_PLAYER (chr) && !cons)
    //       skill_gain (chr, gsn_third_attack, TRUE);
    //     if (FIGHTING (chr) != victim)
    //       return;
    //   }
    //      /* chance = IS_MOB(chr) ? LEVEL(chr) / 10 : 0;
    //         if ( number_percent( ) < chance )
    //         one_hit( chr, victim, dt, wield, cons ); */

    //    }
    //  if (victim->position == POSITION_RESTING || victim->position == POSITION_SLEEPING || victim->position == POSITION_STANDING)
    //    set_fighting (victim, chr);
    //  if (action_object)
    //    {
    //      SPELL_DATA *s;
    //      int spellLevel;
    //      if (castsp)
    //   {
    //     if ((s = skill_lookup (NULL, action_object->pIndexData->values_2[2])) != NULL)
    //       {
    //         if (s->spellLevel <= LEVEL (chr))
    //      {
    //        if (action_object->pIndexData->values_2[4] > 0)
    //          spellLevel = action_object->pIndexData->values_2[4];
    //        else
    //          spellLevel = LEVEL (chr) / 2;
    //        if (s->spell_type == TAR_CHAR_DEFENSIVE)
    //          {
    //            general_spell (s, spellLevel, chr, chr);
    //          }
    //        else
    //          {
    //            general_spell (s, spellLevel, chr, victim);
    //          }
    //      }
    //       }
    //   }
    //      if (!castsp)
    //   {
    //     if (action_object->pIndexData->action_descr[0])
    //       {
    //         currentActionsAndBehavior (action_object->pIndexData->action_descr[0], chr, action_object, victim, TO_CHAR);
    //       }
    //     if (action_object->pIndexData->action_descr[1])
    //       {
    //         currentActionsAndBehavior (action_object->pIndexData->action_descr[1], chr, action_object, victim, TO_VICT);
    //       }
    //     if (action_object->pIndexData->action_descr[2])
    //       {
    //         currentActionsAndBehavior (action_object->pIndexData->action_descr[2], chr, action_object, victim, TO_NOTVICT);
    //       }
    //     SUBHIT(victim, number_range (1, action_object->pIndexData->values_2[0]));
    //     if (victim->HPCurrent < 1)
    //       victim->HPCurrent = 1;
    //   }
    //    }
    //  using_weapon = FALSE;
    //  using_shield = FALSE;
    //  return;
    //}

    //int
    //addoffense (CharacterData  chr, SINGLE_OBJECT * obj)
    //{
    //  if (IS_MOB (chr))
    //    return 0;
    //  if (IS_SET (obj->extra_flags, ITEM_LASER))
    //    {
    //      if (chr->pcdata->learned[gsn_laser] < 2)
    //   {
    //     return -100;
    //   }
    //      else
    //   return (chr->pcdata->learned[gsn_laser] / 4);
    //    }
    //  if (IS_SET (obj->extra_flags, ITEM_PIERCE))
    //    return (chr->pcdata->learned[gsn_pierce] == -100 ? 0 : chr->pcdata->learned[gsn_pierce] / 4);
    //  if (IS_SET (obj->extra_flags, ITEM_CONCUSSION))
    //    return (chr->pcdata->learned[gsn_concussion] == -100 ? 0 : chr->pcdata->learned[gsn_concussion] / 5);
    //  if (IS_SET (obj->extra_flags, ITEM_WHIP))
    //    return (chr->pcdata->learned[gsn_whip] == -100 ? 0 : chr->pcdata->learned[gsn_whip] / 4);
    //  if (chr->pcdata->learned[gsn_slashing] == -100)
    //    return 0;
    //  if (IS_SET (obj->extra_flags, ITEM_HEAVY_SLASH))
    //    {
    //      if (get_curr_str (chr) < 11)
    //   return -3;
    //      if (get_curr_str (chr) < 16)
    //   return 0;
    //      if (get_curr_str (chr) < 18)
    //   return (chr->pcdata->learned[gsn_slashing] / 7);
    //      if (get_curr_str (chr) < 21)
    //   return (chr->pcdata->learned[gsn_slashing] / 6);
    //      if (get_curr_str (chr) < 24)
    //   return (chr->pcdata->learned[gsn_slashing] / 5);
    //      else
    //   return (chr->pcdata->learned[gsn_slashing] / 4);
    //    }
    //  if (IS_SET (obj->extra_flags, ITEM_LIGHT_SLASH))
    //    return ((chr->pcdata->learned[gsn_slashing] / 4) + ((get_curr_str (chr) - 5) / 2));
    //  if (IS_SET (obj->extra_flags, ITEM_SLASHING))
    //    return (chr->pcdata->learned[gsn_slashing] / 5);
    //  return 0;
    //}


    //void
    //one_hit (CharacterData  chr, CharacterData  victim, int dt, SINGLE_OBJECT * obj, bool consid)
    //{
    //  SINGLE_OBJECT *wield;
    //  int to_hit;
    //  int bonushit;
    //  int max_absorb;
    //  int actual_absorb;
    //  double dam;
    //  int diceroll;
    //  int iWear;
    //  int hit_pos;
    //  max_absorb = 0;
    //  actual_absorb = 0;
    //  bonushit = 0;
    //  CHECK_CHAR (chr);
    //  CHECK_CHAR (victim);

    //  check_ced (chr);
    //  check_ced (victim);
    //  check_fgt (chr);
    //  check_fgt (victim);

    //if (chr->inRoom != victim->inRoom) {
    //   chr->fightInfoInternal->chAttacking=NULL;
    //   victim->fightInfoInternal->chAttacking=NULL;
    //   chr->position=POSITION_STANDING;
    //   victim->position=POSITION_STANDING;
    //   return;
    //}


    //  hit_pos = number_range (1, 4);
    //  if (victim && chr && victim->height > chr->height + 22 && hit_pos == STRIKE_HEAD)
    //    {
    //      if (number_range (1, 2) == 2)
    //   hit_pos = STRIKE_LEGS;
    //      else
    //   hit_pos = STRIKE_BODY;
    //    }
    //  if (!consid)
    //    {
    //      /*If I'm considering, don't do the following */
    //      if (victim->position == POSITION_DEAD || chr->inRoom != victim->inRoom)
    //   {
    //     chr->fightInfoInternal->chAttacking = NULL;
    //     victim->fightInfoInternal->chAttacking = NULL;
    //     chr->wait = 0;
    //     return;
    //   }
    //      if (chr && victim && IS_MOB (chr) && IS_PLAYER (victim) &&
    //     (LEVEL (victim) > 5) &&
    //     (!HUNTING (chr) || (HUNTING (chr) && !is_number (HUNTING (chr)))))

    //   {
    //     if (strlen (NAME (victim)) < 16)
    //       {
    //         if (HUNTING (chr) != NULL)
    //      {
    //        free_string (chr->fightInfoInternal->rgHunting);
    //        chr->fightInfoInternal->rgHunting = NULL;
    //      }
    //         chr->fightInfoInternal->rgHunting = str_dup (NAME (victim));
    //       }
    //   }
    //      if (MOUNTED_BY (victim) == chr)
    //   {
    //     chr->fightInfoInternal->chRiding = NULL;
    //     victim->fightInfoInternal->chMountedBy = NULL;
    //   }
    //    }
    ///*End is consid */
    ///*
    //   * Figure out the type of damage message.
    // */
    //  wield = obj;
    //  if (wield && wield->pIndexData->item_type != ITEM_WEAPON)
    //    wield = NULL;
    //  if (dt == TYPE_UNDEFINED)
    //    {
    //      dt = TYPE_HIT;
    //      if (wield != NULL && wield->pIndexData->item_type == ITEM_WEAPON)
    //   {
    //     I_WEAPON *w = (I_WEAPON *) wield->MoreRoomInfo;
    //     {
    //       if (w->attack_type == 3 && number_range (1, 15) == 4)
    //         dt += 2;
    //       else if (w->attack_type == 11 && number_range (1, 15) == 5)
    //         dt += 1;
    //       else
    //         dt += w->attack_type;
    //     }
    //     if (IS_PLAYER (chr))
    //       bonushit = addoffense (chr, wield);
    //   }
    //    }

    //  to_hit = ((get_curr_dex (chr) + 13 + bonushit + GET_HITROLL (chr) +
    //     LEVEL (chr) / 7 + (IS_SET (chr->ced->cmbatOptions, F_AGGRESSIVE) ? 5 : 0)) -
    //       (LEVEL (victim) / 4 + (get_curr_dex (victim) - 5) +
    //        (!IS_SET (victim->ced->cmbatOptions, F_AGGRESSIVE) ? 8 : 0)));

    //  if (IS_MOB (chr))
    //    to_hit += chr->pIndexData->extraHitroll;
    //  if (HAS_ARMS_DEXTERITY_IMPLANT (chr))
    //    to_hit += number_range (5, 14);

    //  if (number_percent () >= to_hit && number_range (0, 9) >= 6 &&
    //      dt != gsn_backstab && dt != gsn_circle && IS_AWAKE (victim))
    //    {
    //      /* Shit! Missed! */
    //      if (!consid)
    //   {
    //     ghit_pos = hit_pos;
    //     damage (chr, victim, 0, dt);
    //     ghit_pos = 0;
    //   }
    //      else
    //   cons_damage += 0;
    //      return;
    //    }
    //  if (!consid && IS_PLAYER (chr) && wield != NULL && wield->pIndexData->item_type == ITEM_WEAPON)
    //    {
    //      if (IS_SET (wield->extra_flags, ITEM_LASER))
    //   skill_gain (chr, gsn_laser, TRUE);
    //      if (IS_SET (wield->extra_flags, ITEM_PIERCE))
    //   skill_gain (chr, gsn_pierce, TRUE);
    //      if (IS_SET (wield->extra_flags, ITEM_CONCUSSION))
    //   skill_gain (chr, gsn_concussion, TRUE);
    //      if (IS_SET (wield->extra_flags, ITEM_WHIP))
    //   skill_gain (chr, gsn_whip, TRUE);
    //      if (IS_SET (wield->extra_flags, ITEM_HEAVY_SLASH) ||
    //     IS_SET (wield->extra_flags, ITEM_LIGHT_SLASH) ||
    //     IS_SET (wield->extra_flags, ITEM_SLASHING))
    //   skill_gain (chr, gsn_slashing, TRUE);
    //    }
    //  diceroll = number_range (0, 19);
    //  dam = 0;
    //  if (IS_MOB (chr))
    //    {
    //#ifdef NEW_NEW
    //      if (wield != NULL && wield->pIndexData->item_type == ITEM_WEAPON)
    //   {
    //     dam = (dice (FIRSTDICE (wield), SECONDDICE (wield)) / 2) +
    //       (number_range (LEVEL (chr) / 3, (LEVEL (chr)) / 2));
    //   }
    //      else
    //   {
    //     dam = number_range ((LEVEL (chr)*2)/5, (LEVEL (chr)*4)/5 );
    //   }
    //#else
    //      if (wield != NULL && wield->pIndexData->item_type == ITEM_WEAPON)
    //   {
    //     dam = (dice (FIRSTDICE (wield), SECONDDICE (wield)) / 2) +
    //       (number_range (LEVEL (chr) / 4, (LEVEL (chr)) / 2));
    //   }
    //      else
    //   {
    //     dam = number_range (LEVEL (chr) / 4, (LEVEL (chr)) / 2);
    //   }
    //#endif
    //      dam += chr->pIndexData->damageRoll;
    //      if (dam <= 0)
    //   dam = 1;
    //    }

    //  else
    //    {
    //      if (wield != NULL && wield->pIndexData->item_type == ITEM_WEAPON)
    //   {
    //     dam = dice (FIRSTDICE (wield), SECONDDICE (wield));
    //   }
    //      else
    //   {
    //     /*FISTS of HIGH-LEVS now do MoreRoomInfo damage */
    //     if (IS_SET (chr->ced->cmbatOptions, F_AGGRESSIVE))
    //       {
    //         if (LEVEL (chr) < 10)
    //      dam = number_range (1, 3);
    //         else if (LEVEL (chr) < 20)
    //      dam = number_range (1, 4);
    //         else if (LEVEL (chr) < 35)
    //      dam = number_range (1, 6);
    //         else if (LEVEL (chr) < 50)
    //      dam = number_range (1, 7);
    //         else if (LEVEL (chr) < 65)
    //      dam = number_range (2, 9);
    //         else if (LEVEL (chr) < 90)
    //      dam = number_range (3, 11);
    //         else
    //      dam = number_range (6, 14);
    //       }
    //     else
    //       dam = number_range (1, 3);
    //     if (HAS_HANDS_STRENGTH_IMPLANT (chr))
    //       dam += number_range (2, 5);
    //     if (HAS_BODY_STRENGTH_IMPLANT (chr))
    //       dam += number_range (1, 3);
    //   }
    //    }

    //  if (LEVEL (chr) > 8 && IS_SET (chr->ced->cmbatOptions, F_POWER))
    //    dam += 1;
    //  if (IS_PLAYER (chr))
    //    dam += (number_range (0, GET_DAMROLL (chr)) / 2);
    //  if (!consid && IS_PLAYER (chr) && chr->pcdata->learned[gsn_enhanced_damage] > 0)
    //    {
    //      dam += (dam * chr->pcdata->learned[gsn_enhanced_damage]) / 400;
    //      if (number_range (1, 15) == 10)
    //   skill_gain (chr, gsn_enhanced_damage, TRUE);
    //    }

    //  if (IS_SET (chr->ced->cmbatOptions, F_AGGRESSIVE) && number_range (1, 2) == 2)
    //    dam += 1;

    //  {
    //    double b4 = dam;
    //    double aftr;
    //    double dif;
    //#ifdef NEW_WORLD
    //    if (IS_PLAYER (chr) && IS_PLAYER (victim) && dam > 17)
    //      dam = (double) number_range (10, 18);
    //    if (IS_PLAYER (chr) && IS_PLAYER (victim))
    //      dam = (double) new_damage_2 (victim, dam, hit_pos, dt);
    //    else
    //#endif
    //      dam = (double) new_damage (victim, dam, hit_pos, dt);
    //    aftr = dam;
    //    dif = b4 - aftr;
    //    if (!consid && IS_PLAYER (chr) && dif > 4 && number_range (1, 100) < chr->pcdata->learned[gsn_penetration])
    //      {
    //   if (number_range (1, 5) == 2)
    //     skill_gain (chr, gsn_penetration, TRUE);
    //   dif /= 2;
    //   dam += dif;
    //      }
    //  }

    //  if (!consid)
    //    {
    //      if (chr->position != POSITION_BASHED && victim->position != POSITION_BASHED && number_range (1, 7) == 4 && IS_AFFECTED (chr, AFF_FLYING) && !IS_AFFECTED (victim, AFF_FLYING))
    //   {
    //     currentActionsAndBehavior ("$n swoops down and attacks $N!", chr, NULL, victim, TO_NOTVICT);
    //     currentActionsAndBehavior ("$n swoops down from the air and attacks you!", chr, NULL, victim, TO_VICT);
    //     currentActionsAndBehavior ("You swoop down from the air and attack $N!", chr, NULL, victim, TO_CHAR);
    //     dam += 2;
    //     if (number_range (1, 12) == 5)
    //       {
    //         if (number_range (1, 2) == 1)
    //      {
    //        currentActionsAndBehavior ("$N catches $n with an elbow while $e is approaching!", chr, NULL, victim, TO_NOTVICT);
    //        currentActionsAndBehavior ("You catch $n with an elbow as $e approaches!", chr, NULL, victim, TO_VICT);
    //        currentActionsAndBehavior ("$N smashes $S elbow into your face as you swoop down!", chr, NULL, victim, TO_CHAR);
    //      }
    //         else
    //      {
    //        currentActionsAndBehavior ("$N jumps out of the way and $n smashes into the ground!", chr, NULL, victim, TO_NOTVICT);
    //        currentActionsAndBehavior ("You jump out of the way and $n smashes into the ground!", chr, NULL, victim, TO_VICT);
    //        currentActionsAndBehavior ("$N steps out of the way and you smash into the ground!", chr, NULL, victim, TO_CHAR);
    //      }
    //         if (chr->HPCurrent > 7)
    //      SUBHIT(chr,7);
    //         return;
    //       }
    //   }
    //      if (chr->position != POSITION_BASHED && victim->position != POSITION_BASHED && number_range (1, 11) == 4 && !IS_AFFECTED (chr, AFF_FLYING) && IS_AFFECTED (victim, AFF_FLYING))
    //   {
    //     /*hitter not flying, victim flying */
    //     currentActionsAndBehavior ("$N quickly flies out of the way, dodging your attack!", chr, NULL, victim, TO_CHAR);
    //     currentActionsAndBehavior ("$N flies out of $n's attack path.", chr, NULL, victim, TO_NOTVICT);
    //     currentActionsAndBehavior ("You fly out of the path of $n's attack.", chr, NULL, victim, TO_VICT);
    //     return;
    //   }
    //      if (chr->position != POSITION_BASHED && victim->position != POSITION_BASHED && number_range (1, 34) == 6 && IS_AFFECTED (chr, AFF_FLYING) && IS_AFFECTED (victim, AFF_FLYING))
    //   {
    //     /*both hitter and victim flying */
    //     currentActionsAndBehavior ("$N and $n get tangled and smash into the ground!", chr, NULL, victim, TO_NOTVICT);
    //     currentActionsAndBehavior ("You smash into the ground as you struggle with $n!", chr, NULL, victim, TO_VICT);
    //     currentActionsAndBehavior ("You smash into the ground as you struggle with $N!", chr, NULL, victim, TO_CHAR);
    //     if (chr->HPCurrent > 10)
    //       {
    //         SUBHIT(chr,9);
    //         SUBHIT(victim,9);
    //       }
    //     return;
    //   }
    //      if (!IS_AWAKE (victim))
    //   {
    //     if (dam < 2)
    //       dam = 2;
    //     dam = (dam * 3);
    //   }
    //      if (victim->position == POSITION_RESTING)
    //   {
    //     if (dam < 2)
    //       dam = 2;
    //     dam = (dam * 3) / 2;
    //   }
    //    }

    ///*end if !consid */
    //  if (dt == gsn_circle)
    //    {
    //      int muu;
    //      if (dam < 3)
    //   dam = 3;
    //      muu = 2 + (LEVEL (chr) / 17);
    //      if (is_member (chr, GUILD_ASSASSIN))
    //   {
    //     muu += 1;
    //     dam += 1;
    //   }
    //      if (is_member (chr, GUILD_THIEFG))
    //   {
    //     muu += 1;
    //     dam += 1;
    //   }
    //      if (muu > 6)
    //   muu = 6;
    //      dam *= muu;
    //    }

    //  if (dt == gsn_backstab)
    //    {
    //      double mult;
    //      mult = 0.0;
    //      mult = 2.5 + ((double) (LEVEL (chr)) / 10.0);
    //      if (mult > 11)
    //   mult = 11.5;
    //      if (is_member (chr, GUILD_ASSASSIN))
    //   {
    //     mult += 2.0;
    //     dam += 3.8;
    //   }
    //      if (is_member (chr, GUILD_THIEFG))
    //   {
    //     mult += 1.2;
    //     dam += 1.4;
    //   }
    //      if (!IS_AWAKE (victim))
    //   mult += 3.0;
    //      dam *= mult;
    //    }

    //  if (dam <= 0)
    //    dam = 1;
    //  if (!consid)
    //    {
    //      if (number_range (1, 5) == 1 && chr->MPCurrent > 0)
    //   {
    //     SUBMOVE(chr,1);
    //     upd_mps (chr);
    //   }
    //    }

    //  ghit_pos = hit_pos;
    ///*end if !consid */
    //  if (wield && ((I_WEAPON *) wield->MoreRoomInfo)->damage_p < 3)
    //    {
    //      if (!consid)
    //   damage (chr, victim, dam / 10, dt);
    //      else
    //   cons_damage += 1;
    //      if (!consid)
    //   send_to_char ("Your weapon is so bashed up it hardly does any damage!\n\r", chr);
    //    }

    //  else if (wield && ((I_WEAPON *) wield->MoreRoomInfo)->damage_p < 15)
    //    {
    //      if (!consid)
    //   damage (chr, victim, dam / 3, dt);
    //      else
    //   cons_damage += (dam / 3);
    //    }

    //  else if (wield && ((I_WEAPON *) wield->MoreRoomInfo)->damage_p < 44)
    //    {
    //      if (!consid)
    //   damage (chr, victim, dam / 2, dt);
    //      else
    //   cons_damage += (dam / 2);
    //    }

    //  else if (wield && ((I_WEAPON *) wield->MoreRoomInfo)->damage_p < 73)
    //    {
    //      if (dam > 31)
    //   dam -= 7;
    //      else if (dam > 22)
    //   dam -= 6;
    //      else if (dam > 15)
    //   dam -= 4;
    //      else if (dam > 9)
    //   dam -= 2;
    //      else if (dam > 4)
    //   dam -= 1;
    //      if (!consid)
    //   damage (chr, victim, dam, dt);
    //      else
    //   cons_damage += dam;
    //    }

    //  else if (!consid) {
    //   hitop=TRUE;
    //    damage (chr, victim, dam, dt);
    //   }
    //  else
    //    cons_damage += dam;
    //if (victim->data_type==50) return;
    //  if (!consid)
    //    if (FIGHTING (chr) == NULL)
    //      return;
    //  if (!consid)
    //    {
    //      if (wield && (((I_WEAPON *) wield->MoreRoomInfo)->strength != 0) &&
    //     (dam >= ((I_WEAPON *) wield->MoreRoomInfo)->strength))
    //   if (number_range (1, 12) == 5)
    //     {
    //       --((I_WEAPON *) wield->MoreRoomInfo)->damage_p;
    //       if (((I_WEAPON *) wield->MoreRoomInfo)->damage_p == 1)
    //         {
    //      send_to_char ("--->ACK! Your weapon just broke!\n\r", chr);
    //      unequip_char (chr, wield);
    //      free_it (wield);
    //      return;
    //         }
    //       else if (number_range (1, 4) == 3)	/*only display occasionally */
    //         send_to_char ("Your weapon is damaged slightly by your attack!\n\r", chr);
    //     }

    //      ghit_pos = 0;

    //      if (dam >= 4 && number_range (1, 3) == 1
    //     && (wield = get_eq_char (victim,
    //        (iWear = number_range (WEAR_NONE + 1, MAX_WEAR)))) != NULL
    //     && wield->pIndexData->item_type == ITEM_ARMOR
    //     && wield->wear_loc != -1
    //     && ((I_ARMOR *) wield->MoreRoomInfo)->max_condition)
    //   {
    //     int localle;
    //     char blah[STD_LENGTH];
    //     string tmp;
    //     if (hit_pos == STRIKE_BODY)
    //       {
    //         if (wield->wear_loc != WEAR_BODY && wield->wear_loc != WEAR_WAIST &&
    //        wield->wear_loc != WEAR_SHIELD && wield->wear_loc != WEAR_ABOUT)
    //      goto brkl;
    //       }
    //     if (hit_pos == STRIKE_HEAD)
    //       {
    //         if (wield->wear_loc != WEAR_HEAD && wield->wear_loc != WEAR_NECK_1 &&
    //        wield->wear_loc != WEAR_NECK_2 && wield->wear_loc != WEAR_FACE &&
    //        wield->wear_loc != WEAR_SHIELD && wield->wear_loc != WEAR_EAR_1 &&
    //        wield->wear_loc != WEAR_EAR_2)
    //      goto brkl;
    //       }
    //     if (hit_pos == STRIKE_ARMS)
    //       {
    //         if (wield->wear_loc != WEAR_ARMS && wield->wear_loc != WEAR_HANDS &&
    //        wield->wear_loc != WEAR_SHIELD && wield->wear_loc != WEAR_WRIST_L &&
    //        wield->wear_loc != WEAR_WRIST_R && wield->wear_loc != WEAR_SHOULDER_L &&
    //        wield->wear_loc != WEAR_SHOULDER_R)
    //      goto brkl;
    //       }
    //     if (hit_pos == STRIKE_LEGS)
    //       {
    //         if (wield->wear_loc != WEAR_LEGS && wield->wear_loc != WEAR_FEET &&
    //        wield->wear_loc != WEAR_ANKLE_1 && wield->wear_loc != WEAR_ANKLE_2)
    //      goto brkl;
    //       }
    //     if (wield->pIndexData->short_descr[0] != '\0')
    //       {
    //         for (tmp = wield->pIndexData->short_descr; *tmp != '\0'; tmp++)
    //      {
    //      };
    //         if (*(tmp - 1) == 's')
    //      sprintf (blah, "$p are damaged.");
    //         else
    //      sprintf (blah, "$p is damaged.");
    //         currentActionsAndBehavior (blah, victim, wield, NULL, TO_CHAR);
    //         localle = wield->wear_loc;
    //         unequip_char (victim, wield);
    //         --((I_ARMOR *) wield->MoreRoomInfo)->condition_now;
    //         equip_char (victim, wield, localle);
    //         if (((I_ARMOR *) wield->MoreRoomInfo)->condition_now <= 0)
    //      {
    //        if (*tmp == 's')
    //          sprintf (blah, "The damage was so powerful, $p fall apart!");
    //        else
    //          sprintf (blah, "The damage was so powerful, $p falls apart!");
    //        currentActionsAndBehavior (blah, victim, wield, NULL, TO_CHAR);
    //        unequip_char (victim, wield);
    //        free_it (wield);
    //        return;
    //      }
    //       }
    //   }
    //    brkl:
    //   if (wield) {};
    //    }

    ///*end if !consid */
    //  return;
    //}

    //bool
    //can_trip (CharacterData  chr)
    //{
    //  if (number_range (1, 4) != 1)
    //    return FALSE;
    //  if (IS_PLAYER (chr))
    //    return TRUE;
    //  if (chr->pIndexData->mobtype == HUMAN
    //      || chr->pIndexData->mobtype == DWARF
    //      || chr->pIndexData->mobtype == ELF
    //      || chr->pIndexData->mobtype == GIANT
    //      || chr->pIndexData->mobtype == DRAGON)
    //    return TRUE;
    //  return FALSE;
    //}
    //bool
    //bashable (CharacterData  chr)
    //{
    //  if (IS_PLAYER (chr))
    //    return TRUE;
    //  if (chr->pIndexData->mobtype == GHOST)
    //    return FALSE;
    //  if (chr->pIndexData->mobtype == DRAGON)
    //    return FALSE;
    //  return TRUE;
    //}
    //int
    //kickable (CharacterData  chr)
    //{
    //  if (IS_PLAYER (chr))
    //    return 1;
    //  if (chr->pIndexData->mobtype == GHOST)
    //    return 0;
    //  if (IS_AFFECTED (chr, AFF_FLYING))
    //    return 2;
    //  return 1;
    //}

    //bool
    //pkill (CharacterData  chr, CharacterData  victim)
    //{
    //  return TRUE;
    //}

    //bool
    //is_using_sword (CharacterData  chr)
    //{
    //  SINGLE_OBJECT *obj;
    //  if (!chr)
    //    return FALSE;
    //  for (obj = chr->carryingObjects; obj != NULL; obj = obj->next_content)
    //    {
    //      if (obj->wear_loc != WEAR_HOLD_1 && obj->wear_loc != WEAR_HOLD_2)
    //   continue;
    //      if (obj->pIndexData->item_type != ITEM_WEAPON)
    //   continue;
    //      if (((I_WEAPON *) obj->MoreRoomInfo)->attack_type == 3)
    //   return TRUE;
    //    }

    //  return FALSE;
    //}
    ///*
    //   * Inflict damage from a HPCurrent.
    // */
    //void
    //damage (CharacterData  chr, CharacterData  victim, int dam, int dt)
    //{
    //  bool display_pr;
    //  CHECK_CHAR (chr);
    //  CHECK_CHAR (victim);
    //  check_fgt (chr);
    //  check_fgt (victim);
    //if (!chr->inRoom || !victim->inRoom) return;
    //if (chr->inRoom != victim->inRoom) {
    //   chr->fightInfoInternal->chAttacking=NULL;
    //   victim->fightInfoInternal->chAttacking=NULL;
    //   chr->position=POSITION_STANDING;
    //   victim->position=POSITION_STANDING;
    //   return;
    //}

    //  add_to_fighting_list (chr);
    //  add_to_fighting_list (victim);
    //  if (!FIGHTING(chr)) set_fighting(chr,victim);
    //  if (!FIGHTING(victim)) set_fighting(victim,chr);
    //  if (dt > 19000)
    //    {
    //      dt -= 20000;
    //      display_pr = FALSE;
    //    }

    //  else
    //    display_pr = TRUE;
    //  if (victim == NULL)
    //    {
    //      chr->fightInfoInternal->chAttacking = NULL;
    //      return;
    //    }

    //  if (!victim->inRoom || !victim->inRoom->area ||
    //      ((IS_PLAYER (chr) && LEVEL (chr) > 99 && !IS_REAL_GOD (chr)) && victim->inRoom && victim->inRoom->area &&
    //       victim->inRoom->area->open == 1))
    //    {
    //      chr->fightInfoInternal->chAttacking = NULL;
    //      victim->fightInfoInternal->chAttacking = NULL;
    //      return;
    //    }

    //  if (victim->position == POSITION_DEAD)
    //    {
    //      chr->wait = 0;
    //   stop_fighting(chr,TRUE);
    //      return;
    //    }

    //  if (FIGHTING (victim) == chr && FIGHTING (chr) != victim && !(victim->position == POSITION_GROUNDFIGHTING &&
    //          chr->position == POSITION_GROUNDFIGHTING) && dt != gsn_kick &&
    //      victim->position != POSITION_CASTING && victim->position != POSITION_BASHED &&
    //      chr->position != POSITION_CASTING && chr->position != POSITION_BASHED)
    //    {
    //      NEW_POSITION(chr, POSITION_FIGHTING);
    //      NEW_POSITION(victim, POSITION_FIGHTING);
    //      if (IS_PLAYER (chr) && chr->description != NULL)
    //   {
    //     dd.SendTelnetCommand (chr->description, "\n\r", 2);
    //   }
    //if (chr!=victim || pow.canFightSelf) {
    //      chr->fightInfoInternal->chAttacking = victim;
    //      }
    //    }

    //  if (chr->position == POSITION_GROUNDFIGHTING && victim->position != POSITION_GROUNDFIGHTING)
    //    {
    //      NEW_POSITION(chr, POSITION_FIGHTING);
    //    }

    //  update_pos (victim);
    //  if (victim->position == POSITION_DEAD)
    //    goto isdedman;
    ///*
    //   * Stop up any residual loopholes.
    // */
    //  if (victim != chr)
    //    {
    //      if (is_safe (chr, victim))
    //   {
    //     if (IS_MOB (chr))
    //       return;
    //     currentActionsAndBehavior ("\x1B[1;37mYou hear a loud clash of thunder in the sky, sent forth by", chr, NULL, NULL, TO_CHAR);
    //     currentActionsAndBehavior ("the gods, and you decide not to attack.\x1B[0m", chr, NULL, NULL, TO_CHAR);
    //     currentActionsAndBehavior ("You hear massive clashes of thunder in the heavens above.",
    //          chr, NULL, NULL, TO_NOTVICT);
    //     return;
    //   }

    //      if (IS_PLAYER (chr) && !IS_IMMORTAL (chr))
    //   {
    //     chr->pcdata->no_quit = 2;
    //   }

    //      if (IS_PLAYER (victim) && !IS_IMMORTAL (victim))
    //   {
    //     victim->pcdata->no_quit = 2;
    //   }

    //      if (IS_PLAYER (chr) && !IS_MOB (victim) && !IS_IMMORTAL (chr) && !IS_IMMORTAL (victim))
    //   {
    //     /*player killing player */
    //     chr->pcdata->no_quit_pk = 5;
    //     victim->pcdata->no_quit_pk = 5;
    //   }
    //      if (can_yell (victim) && victim->HPCurrent < 8 && victim->HPMax > 100 && chr->HPCurrent > 60)
    //   {
    //     do_fatal (victim, chr, dt);
    //   }
    //      if (IS_PLAYER (chr) && dam > 2 && chr && victim && chr != victim)
    //   {
    //     int gn;
    //#ifdef NEW_WORLD
    //     gn = (dam * 2) + (LEVEL (victim) * 3) + ((LEVEL (chr) * LEVEL (chr)) / 4) + number_range (1, (LEVEL (victim) + LEVEL (chr)));
    //#else
    //     gn = (dam * 3) + (LEVEL (victim) * 3) + ((LEVEL (chr) * LEVEL (chr)) / 8) + number_range (1, (LEVEL (victim) + LEVEL (chr)));
    //#endif
    //     if (LEVEL (chr) < 100 && chr->inRoom && chr->inRoom->vnumClan >= 1000 &&
    //         (!(LEVEL (chr) > 10 && LEVEL (victim) < 4) && !(LEVEL (chr) > 20 && LEVEL (victim) < 8) &&
    //          !(LEVEL (chr) > 35 && LEVEL (victim) < 14) && !(LEVEL (chr) > 50 && LEVEL (victim) < 20)))
    //       {
    //         if ((IS_PLAYER (chr) && !IS_PLAYER (victim)) || (!IS_PLAYER (chr) && IS_PLAYER (victim)))
    //      {
    //        gain_exp (chr, gn);
    //        if (IS_PLAYER (chr))
    //          chr->pcdata->voting_on += gn;
    //      }
    //       }
    //   }
    //      if (victim->position > POSITION_STUNNED && dam > 0)
    //   {
    //     if (FIGHTING (victim) == NULL)
    //       {
    //         set_fighting (victim, chr);
    //            NEW_POSITION(victim, POSITION_FIGHTING);
    //       }
    //   }
    //      if (victim->position > POSITION_STUNNED)
    //   {
    //     if (FIGHTING (chr) == NULL && dt != TYPE_SHOT)
    //       set_fighting (chr, victim);
    //   }
    ///*
    //   * More charm stuff.
    // */
    //      if (MASTER (victim) == chr)
    //   stop_follower (victim);
    //      if (IS_AFFECTED (chr, AFF_HIDE) && dt != TYPE_SHOT)
    //   {
    //     affect_strip (chr, gsn_hide);
    //     REMOVE_BIT (chr->currentlyAffectedBy, AFF_HIDE);
    //     currentActionsAndBehavior ("$n is revealed.", chr, NULL, NULL, TO_ROOM);
    //   }
    ///*
    //   * Damage modifiers.
    // */
    //      if (dt > 999)
    //   {
    //     if (IS_EVIL (chr) && IS_AFFECTED (victim, AFF_PROT_EVIL))
    //       dam -= number_range (0, (dam / 3));
    //     if (IS_GOOD (chr) && IS_AFFECTED (victim, AFF_PROT_GOOD))
    //       dam -= number_range (0, (dam / 3));
    //     if (IS_AFFECTED (victim, AFF_SANCTUARY))
    //       dam -= number_range (0, (dam / 2));
    //     if (IS_AFFECTED (victim, AFF_PROTECT))
    //       dam -= dam / 2;
    //     if (dam < 0)
    //       dam = 0;
    //   }
    //      if (!chr || !victim)
    //   return;
    ///*
    //   * Check for disarm, trip, extraParryBonus, and extraDodgeBonus.
    // */
    //      if (dt >= TYPE_HIT && dt != TYPE_SHOT)
    //   {
    //     if ((IS_MOB (chr) && number_percent () < 20)
    //         && chr->MPCurrent > 10)
    //       {
    //         if (can_trip (chr) &&
    //        victim->position != POSITION_GROUNDFIGHTING && victim->position != POSITION_CASTING)
    //      {
    //        disarm (chr, victim);
    //      }
    //       }
    //     if ((IS_MOB (chr) && number_percent () < 8) &&
    //         victim->position != POSITION_GROUNDFIGHTING && can_trip (chr) &&
    //         victim->position != POSITION_CASTING && can_trip (victim)
    //         && victim->fightInfoInternal->combat_delay_count < 0
    //         && chr->MPCurrent > 10)
    //       {
    //         if (number_range (0, 7) == 1)
    //      trip (chr, victim);
    //         else
    //      {
    //        currentActionsAndBehavior ("$n tries to trip you, but you quickly jump out of the way!", chr, NULL, victim, TO_VICT_SPAM);
    //        currentActionsAndBehavior ("You try to trip $N, but $N swiftly jumps out of the way!", chr, NULL, victim, TO_CHAR);
    //        currentActionsAndBehavior ("$n tries to trip $N, but $N swiftly jumps out of the way!", chr, NULL, victim, TO_NOTVICT_SPAM);
    //      }
    //       }
    //     if (!chr || !victim)
    //       return;
    //     if (dt > 999 && dt != gsn_circle && dt != gsn_backstab)
    //       {
    //         if (IS_AFFECTED (victim, AFF_INVISIBLE) &&
    //        !IS_AFFECTED (chr, AFF_DETECT_INVIS) && number_range (1, 14) == 3)
    //      {
    //        currentActionsAndBehavior ("You flail wildly around, trying to HPCurrent your invisible opponent...", chr, NULL, victim, TO_CHAR_SPAM);
    //        return;
    //      }
    //         if (victim->position == POSITION_GROUNDFIGHTING)
    //      {
    //        if (number_range (1, 3) != 1)
    //          {
    //            currentActionsAndBehavior ("$N is groundfighting and you can't find a line of attack.", chr, NULL, victim, TO_CHAR_SPAM);
    //            currentActionsAndBehavior ("$n can't find a clear line of attack at the moment.", chr, NULL, victim, TO_NOTVICT_SPAM);
    //            return;
    //          }
    //      }
    //         else if (number_range (1, 8) > 2)
    //      {
    //        if (!chr || !victim)
    //          return;
    //        if ((dt == 1003 || dt == 1011) && using_weapon && check_parry (chr, victim))
    //          return;
    //        if (check_dodge (chr, victim))
    //          return;
    //        if (check_shield (chr, victim))
    //          return;
    //      }
    //       }
    //     if (!chr || !victim)
    //       return;
    //     if (!IS_SET (chr->ced->cmbatOptions, F_POWER) && number_range (1, 12) == 4 && chr->position == POSITION_FIGHTING)
    //       {
    //         currentActionsAndBehavior ("$N quickly steps out of the way of your attack.", chr, NULL, victim, TO_CHAR_SPAM);
    //         currentActionsAndBehavior ("$N steps out of the way of $n's attack.", chr, NULL, victim, TO_NOTVICT_SPAM);
    //         currentActionsAndBehavior ("You quickly step out of the way of $n's attack.", chr, NULL, victim, TO_VICT_SPAM);
    //         return;
    //       }
    //   }
    //      if (dt == gsn_backstab || dt == gsn_circle || (dt != TYPE_SHOT && dt != gsn_kick && (!(dt > 0 && dt < 300))))
    //   dam_message (chr, victim, dam, dt, ghit_pos);

    //    }
    //  SUBHIT(victim,dam);
    //  upd_hps (victim);
    //  if (victim->fightInfoInternal && victim->fightInfoInternal->field) {
    //   handle_gs_da(victim,victim->fightInfoInternal->pos_x, victim->fightInfoInternal->pos_y);
    //   }
    //  if (!chr || !victim)
    //    return;
    //  if (victim->position == POSITION_CASTING && dam > 4)
    //    {
    //      NEW_POSITION(victim, POSITION_FIGHTING);
    //      send_to_char ("OUCH! You just lost your concentration!\n\r", victim);
    //    }

    //  if (!IS_AWAKE (victim))
    //    stop_fighting (victim, FALSE);
    //  if (IS_PLAYER (victim)
    //      && LEVEL (victim) >= LEVEL_PLAYER_IMMORTAL
    //      && victim->HPCurrent < 1)
    //    victim->HPCurrent = 1;
    //  update_pos (victim);
    //isdedman:
    //  switch (victim->position)
    //    {
    //    case POSITION_MORTAL:
    //      currentActionsAndBehavior ("$n is mortally wounded, and will die soon if not aided.",
    //      victim, NULL, NULL, TO_ROOM);
    //      send_to_char (
    //       "You are mortally wounded, and will die soon if not aided.\n\r",
    //           victim);
    //      break;
    //    case POSITION_INCAP:
    //      currentActionsAndBehavior ("$n is incapacitated and will suffer a slow, painful death if not aided.",
    //      victim, NULL, NULL, TO_ROOM);
    //      send_to_char (
    //           "You are incapacitated and will suffer a slow, painful death if not aided.\n\r",
    //           victim);
    //      break;
    //    case POSITION_STUNNED:
    //      currentActionsAndBehavior ("$n is stunned, but will probably recover.",
    //      victim, NULL, NULL, TO_ROOM);
    //      send_to_char ("You are stunned, but will probably recover.\n\r",
    //          victim);
    //      break;
    //    case POSITION_DEAD:
    //      if (IS_PLAYER (chr) && LEVEL (chr) < 8)
    //   {
    //     chr->copper++;
    //     send_to_char ("You just got a copper coin from the gods for the kill!\n\r", chr);
    //   }
    //      currentActionsAndBehavior ("$n has been killed!", victim, 0, 0, TO_ROOM);
    //      send_to_char ("You have been killed!\n\r\n\r", victim);
    //      chr->wait = 0;
    //      break;
    //    default:
    //      if (dam > victim->HPMax / 5)
    //   send_to_char ("Ouch, that was *not* pleasant!\n\r", victim);
    //      if (victim->HPCurrent < victim->HPMax / 8)
    //   send_to_char ("You sure are BLEEDING!\n\r", victim);
    //      break;
    //    }

    //  if (!chr || !victim)
    //    return;
    //  if (victim->position == POSITION_DEAD)
    //    {
    //      if (IS_PLAYER (victim) && IN_BATTLE (victim) == TRUE)
    //   {
    //     stop_fighting (victim, TRUE);
    //     NEW_POSITION(victim, POSITION_STANDING);
    //     NEW_POSITION(chr, POSITION_STANDING);
    //     MAXHIT(victim);
    //     upd_hps (victim);
    //     char_from_room (victim);
    //     char_to_room (victim, get_room_index (victim->fightInfoInternal->wasroomtwo));
    //     do_look (victim, "");
    //     return;
    //   }
    //      if (IS_PLAYER (victim) && CHALLENGE (victim) != 0)
    //   {
    //     stop_fighting (victim, TRUE);
    //     NEW_POSITION(victim, POSITION_STANDING);
    //     NEW_POSITION(chr, POSITION_STANDING);
    //     chr->fightInfoInternal->chAttacking = NULL;
    //     victim->fightInfoInternal->chAttacking = NULL;
    //     MAXHIT(chr);
    //     MAXHIT(victim);
    //     upd_hps (chr);
    //     upd_hps (victim);
    //     end_arena (chr, victim);
    //     return;
    //   }
    //      group_gain (chr, victim);
    //      chr->wait = 0;
    //      if (IS_PLAYER (victim))
    //   {
    //     int ii;
    //     char buf[STD_LENGTH];
    //     victim->pcdata->deaths++;
    //     victim->pcdata->no_quit = 0;
    //     if (!IS_EVIL (victim) && !IS_EVIL (chr) && chr->pcdata->bounty > 10 && victim->pcdata->bounty < 10)
    //       {
    //         fprintf (stderr, "%s killed without provocation by %s at %d",
    //             NAME (victim),
    //             NAME (chr),
    //             victim->inRoom->vnumClan);
    //         conv_race (chr);
    //       }
    //     reasonfd[0] = '\0';
    //     if (strlen (NAME (chr)) < 30)
    //       strcpy (reasonfd, NAME (chr));
    //     sprintf (log_buf, "%s killed by %s at %d",
    //         NAME (victim),
    //         NAME (chr),
    //         victim->inRoom->vnumClan);
    //     log_string (log_buf);
    //     sprintf (log_buf, "%s just got killed by %s!", NAME (victim), NAME (chr));
    //     ii = clan_number (victim);
    //     if (ii > 0)
    //       clan_notify (log_buf, ii);
    //     if (LEADER (victim) != NULL)
    //       group_notify (log_buf, victim);
    //     if (IS_PLAYER (chr))
    //       {
    //         sprintf (log_buf, "%s just killed %s!", NAME (chr), NAME (victim));
    //         ii = clan_number (chr);
    //         if (ii > 0)
    //      clan_notify (log_buf, ii);
    //       }
    //     sprintf (buf, "Ntfy> %s", log_buf);
    //     NOTIFY (buf, LEVEL_PLAYER_IMMORTAL, WIZ_NOTIFY_DEATH);
    //     if (IS_PLAYER (chr) && !IS_MOB (victim))
    //       {
    //         if (victim->pcdata->warpoints - (1 + (LEVEL (victim) / 6)) >= 0)
    //      victim->pcdata->warpoints -= (1 + (LEVEL (victim) / 6));
    //       }
    //     if (IS_MOB (chr) && IS_PLAYER (victim))
    //       {
    //         pc_death_penalty (chr, victim);
    //       }
    //     else
    //       gain_exp (victim, -(LEVEL (victim) * 1423));
    //   }

    //      raw_kill (victim, (dt == 1003));
    //   if (IS_JAVA(victim)) do_clear(victim,"");
    //      if (IS_PLAYER (chr) && IS_MOB (victim))
    //   {
    //     int old_gold = 0;
    //     CharacterData others;
    //     char buf[STD_LENGTH];
    //     bool RNQ = TRUE;
    //     for (others = chr->inRoom->MoreRoomInfo->people; others != NULL; others = others->next_in_room)
    //       {
    //         if (FIGHTING (others) == chr || FIGHTING (chr) != NULL)
    //      {
    //        RNQ = FALSE;
    //        break;
    //      }
    //       }
    //     if (RNQ)
    //       chr->pcdata->no_quit = 0;
    //     old_gold = tally_coins (chr);
    //     if (IS_SET (chr->pcdata->act2, PLR_AUTOLOOT))
    //       do_get (chr, "all from corpse");
    //     else if (IS_SET (chr->pcdata->act2, PLR_AUTOGOLD))
    //       do_get (chr, "all.coins from corpse");
    //     if (IS_SET (chr->pcdata->act2, PLR_AUTOSAC))
    //       do_sacrifice (chr, "corpse");
    //     if (IS_SET (chr->pcdata->act2, PLR_AUTOSPLIT)
    //         && tally_coins (chr) - old_gold > 1)
    //       {
    //         sprintf (buf, "%d", tally_coins (chr) - old_gold);
    //         do_split (chr, buf);
    //       }
    //   }
    //      chr->wait = 0;
    //      return;
    //    }

    //  if (victim == chr)
    //    return;
    ///*
    //   * Take care of link dead people.
    // */
    //  if (IS_PLAYER (victim) && victim->description == NULL)
    //    {
    //      if (number_range (0, victim->wait) < 2)
    //   {
    //     do_flee (victim, "");
    //     return;
    //   }
    //    }

    ///*
    //   * Wimp out?
    // */
    ///*
    //  if (IS_MOB (victim) && dam > 0 && dt != TYPE_SHOT)
    //    {
    //      if ((IS_SET (victim->currentActionsAndBehavior, ACT_WIMPY) && number_bits (1) == 0
    //      && victim->HPCurrent < victim->HPMax / 6))
    //   do_flee (victim, "");
    //      return;
    //    }
    //*/
    //  if (IS_PLAYER (victim) && dam > 0 && dt != TYPE_SHOT)
    //    if (victim->ced && victim->HPCurrent <= victim->ced->fleeWhenHPBelow && victim->position != POSITION_BASHED)
    //      do_flee (victim, "");
    //  return;
    //}

    //bool
    //is_safe (CharacterData  chr, CharacterData  victim)
    //{
    //  CharacterData tch;
    //  bool god_present;
    //if (!victim->inRoom) return TRUE;
    //#ifndef NEW_WORLD
    //  if (IN_BOAT(chr) && IN_BOAT(victim) && !is_in_same_boat (chr, victim))
    //    {
    //      send_to_char ("They aren't here.\n\r", chr);
    //      return TRUE;
    //    }

    //  if ((IN_BOAT(chr) || IN_BOAT(victim)) && !is_in_same_boat (chr, victim))
    //    {
    //      send_to_char ("You must be either both in the same boat, or out of your boat to attack.\n\r", chr);
    //      return TRUE;
    //    }
    //#endif

    //  if (IS_REAL_GOD (chr))
    //    return FALSE;
    //  god_present = FALSE;
    //  if (chr->inRoom && ((chr->inRoom->vnumClan < 101 && chr->inRoom->vnumClan > 95) ||
    //            (chr->inRoom->vnumClan >= 400 && chr->inRoom->vnumClan < 500)))
    //    return TRUE;
    //  for (tch = victim->inRoom->MoreRoomInfo->people; tch != NULL; tch = tch->next_in_room)
    //    if (tch != chr && tch != victim && IS_REAL_GOD (tch) && IS_SET (tch->currentActionsAndBehavior, PLR_HOLYPEACE))
    //      god_present = TRUE;
    //  if (god_present)
    //    {
    //      if (FIGHTING (victim) != NULL)
    //   {
    //     victim->fightInfoInternal->chAttacking = NULL;
    //     NEW_POSITION(victim, POSITION_STANDING);
    //   }
    //      if (FIGHTING (chr) != NULL)
    //   {
    //     chr->fightInfoInternal->chAttacking = NULL;
    //     NEW_POSITION(chr, POSITION_STANDING);
    //   }
    //      send_to_char ("No chAttacking in the presence of Gods!\n\r", chr);
    //      return TRUE;
    //    }

    //  if (IN_BATTLE (chr) || CHALLENGE (chr) == 10)
    //    return FALSE;

    //  ALLOW_UNMOTIVATED_PK (yes)

    //#ifdef NEW_WORLD
    //    if (IS_PLAYER (chr) && IS_PLAYER (victim) && IS_EVIL (chr) && !IS_EVIL (victim) && LEVEL (victim) < 10)
    //    {
    //      send_to_char ("That newbie is still protected, sorry.\n\r", chr);
    //      return TRUE;
    //    }

    //  if (IS_PLAYER (chr) && IS_PLAYER (victim) && !IS_EVIL (chr) && IS_EVIL (victim) && LEVEL (chr) < 10)
    //    {
    //      send_to_char ("You may not engage in pkill combat until level 10, sorry.\n\r", chr);
    //      return TRUE;
    //    }
    //#ifdef ALIENPK
    //  if (not_within_levels (chr, victim))
    //    return TRUE;
    //#endif

    //  if (IS_PLAYER (chr) && IS_PLAYER (victim) && NO_PKILL (chr))
    //    return TRUE;
    //  if (IS_PLAYER (victim) && IS_PLAYER (chr) && NO_PKILL (victim))
    //    return TRUE;
    //#endif

    ///*
    //   if (IS_PLAYER(chr) && IS_PLAYER (victim) && !IS_EVIL(chr) &&
    //      !IS_EVIL(victim)
    //      */
    //  if (!pow.goodKillGood && IS_PLAYER(chr) && IS_PLAYER(victim) && !IS_EVIL(chr) &&
    //     !IS_EVIL(victim)) {
    //   return TRUE;
    //  }
    //  if (!pow.evilKillEvil && IS_PLAYER(chr) && IS_PLAYER(victim) && IS_EVIL(chr) &&
    //     IS_EVIL(victim)) {
    //   return TRUE;
    //  }


    //  return FALSE;
    //}


    //bool
    //check_parry (CharacterData  chr, CharacterData  victim)
    //{
    //  int chance;
    //  CharacterData mob;
    //  int number = 0;
    //  if (victim->MPCurrent <= 5)
    //    return FALSE;
    //  if (!IS_AWAKE (victim) || victim->position <= POSITION_STUNNED)
    //    return FALSE;

    ///* Optimize this! */
    //  if (!using_weapon)
    //    return FALSE;


    //  if (IS_AFFECTED (chr, AFF_INVISIBLE) &&
    //      !IS_AFFECTED (victim, AFF_DETECT_INVIS))
    //    {
    //      currentActionsAndBehavior ("You try to extraParryBonus, but you can't see your opponent and fail!", victim, NULL, chr, TO_CHAR);
    //      return FALSE;
    //    }

    ///* If MoreRoomInfo than one chAttacking you, the less chance of parrying */
    //  for (mob = chr->inRoom->MoreRoomInfo->people; mob != NULL; mob = mob->next_in_room)
    //    {
    //      if (FIGHTING (mob) == victim
    //     && mob != victim)
    //   number++;
    //    }

    //  if (number < 1)
    //    number = 1;

    //  if (IS_MOB (victim))
    //    {
    //      chance = victim->pIndexData->extraParryBonus +
    //   (UMIN (60, (LEVEL (victim) * 2)) / (number * 2));
    //    }
    //  else
    //    {
    //      chance = victim->pcdata->learned[gsn_parry] / (2 * number);
    //    }

    //  if (IS_PLAYER (victim) && is_member (victim, GUILD_WARRIOR))
    //    chance += 32;

    //  if (number_range (1, 1000) >= chance)
    //    return FALSE;
    //  if (number_range (1, 2) == 2)
    //    {
    //      currentActionsAndBehavior ("You skillfully extraParryBonus $n's attack.", chr, NULL, victim, TO_VICT);
    //      currentActionsAndBehavior ("$N skillfully parries your attack.", chr, NULL, victim, TO_CHAR);
    //      currentActionsAndBehavior ("$N skillfully parries $n's attack.", chr, NULL, victim, TO_NOTVICT);
    //    }
    //  else
    //    {
    //      currentActionsAndBehavior ("You forcefully deflect $n's blade, parrying the attack.", chr, NULL, victim, TO_VICT);
    //      currentActionsAndBehavior ("$N forcefully deflects your blade, parrying the attack.", chr, NULL, victim, TO_CHAR);
    //      currentActionsAndBehavior ("$N deflects $n's attack with his weapon.", chr, NULL, victim, TO_NOTVICT);
    //    }

    //  if (number_range (1, 3) == 2)
    //    skill_gain (victim, gsn_parry, TRUE);
    //  SUBMOVE(victim,1);
    //  return TRUE;
    //}


    //bool
    //check_dodge (CharacterData  chr, CharacterData  victim)
    //{
    //  int chance;
    //  CharacterData mob;
    //  int number = 0;
    //  if (RIDING (victim) != NULL)
    //    return FALSE;
    //  if (victim->MPCurrent <= 5)
    //    return FALSE;


    //  if (IS_PLAYER (victim))
    //    {
    //      if (victim->pcdata->carry_weight > (get_curr_str (victim) * 2))
    //   if (number_range (1, 6) == 2)
    //     return FALSE;
    //      if (victim->pcdata->carry_weight > (get_curr_str (victim) * 3))
    //   if (number_range (1, 5) == 2)
    //     return FALSE;
    //      if (victim->pcdata->carry_weight > (get_curr_str (victim) * 4))
    //   if (number_range (1, 4) == 2)
    //     return FALSE;
    //      if (victim->pcdata->carry_weight > (get_curr_str (victim) * 5))
    //   if (number_range (1, 3) == 2)
    //     return FALSE;
    //      if (victim->pcdata->carry_weight > (get_curr_str (victim) * 6))
    //   if (number_range (1, 3) == 2)
    //     return FALSE;
    //    }

    //  if (!IS_AWAKE (victim) || victim->position <= POSITION_STUNNED)
    //    return FALSE;
    ///* If MoreRoomInfo than one chAttacking you, the less chance of parrying */
    //  for (mob = chr->inRoom->MoreRoomInfo->people; mob != NULL; mob = mob->next_in_room)
    //    {
    //      if (FIGHTING (mob) == victim
    //     && mob != victim)
    //   number++;
    //    }

    //  if (number < 1)
    //    number = 1;

    //  if (IS_MOB (victim))
    //    {
    //      chance = victim->pIndexData->extraDodgeBonus +
    //   (UMIN (75, ((LEVEL (victim) * 5) / 2)) / (number));
    //    }
    //  else
    //    {
    //      chance = victim->pcdata->learned[gsn_dodge] / (2 * number);
    //    }

    //  if (IS_PLAYER (victim) && !is_member (victim, GUILD_THIEFG))
    //    chance += 32;

    //  if (number_range (0, 1000) >= chance)
    //    return FALSE;

    //  if (IS_AFFECTED (chr, AFF_INVISIBLE) && !IS_AFFECTED (victim, AFF_DETECT_INVIS))
    //    {
    //      if (number_range (1, 10) > 3)
    //   {
    //     currentActionsAndBehavior ("You try to extraDodgeBonus, but since you can't see where the attacker is, you fail!", victim, NULL, victim, TO_VICT);
    //     return FALSE;
    //   }
    //      else
    //   {
    //     currentActionsAndBehavior ("Although you can't see the attacker, you get lucky and extraDodgeBonus the attack!", chr, NULL, victim, TO_VICT);
    //     currentActionsAndBehavior ("$N gets lucky and quickly dodges your attack.", chr, NULL, victim, TO_CHAR);
    //     currentActionsAndBehavior ("$N gets lucky and dodges $n's attack.", chr, NULL, victim, TO_NOTVICT);
    //     if (number_range (1, 4) == 2)
    //       skill_gain (victim, gsn_dodge, TRUE);
    //     SUBMOVE(victim,1);
    //     return TRUE;
    //   }
    //    }

    //  else
    //    {
    //      if (victim->position != POSITION_BASHED)
    //   {
    //     if (number_range (1, 2) == 2)
    //       {
    //         currentActionsAndBehavior ("You step aside, dodging $n's attack.", chr, NULL, victim, TO_VICT);
    //         currentActionsAndBehavior ("$N quickly steps aside, dodging your attack.", chr, NULL, victim, TO_CHAR);
    //         currentActionsAndBehavior ("$N steps aside, dodging $n's attack.", chr, NULL, victim, TO_NOTVICT);
    //       }
    //     else
    //       {
    //         if (number_range (1, 2) == 2)
    //      {
    //        currentActionsAndBehavior ("You duck right, dodging $n's attack.", chr, NULL, victim, TO_VICT);
    //        currentActionsAndBehavior ("$N ducks right, dodging your attack.", chr, NULL, victim, TO_CHAR);
    //        currentActionsAndBehavior ("$N ducks right, dodging $n's attack.", chr, NULL, victim, TO_NOTVICT);
    //      }
    //         else
    //      {
    //        currentActionsAndBehavior ("You duck left, dodging $n's attack.", chr, NULL, victim, TO_VICT);
    //        currentActionsAndBehavior ("$N ducks left, dodging your attack.", chr, NULL, victim, TO_CHAR);
    //        currentActionsAndBehavior ("$N ducks left, dodging $n's attack.", chr, NULL, victim, TO_NOTVICT);
    //      }
    //       }
    //   }
    //      else
    //   {
    //     currentActionsAndBehavior ("You roll out of the way of $n's attack.", chr, NULL, victim, TO_VICT);
    //     currentActionsAndBehavior ("$N rolls out of the way of your attack.", chr, NULL, victim, TO_CHAR);
    //     currentActionsAndBehavior ("$N rolls out of the way of $n's attack.", chr, NULL, victim, TO_NOTVICT);
    //   }
    //      if (number_range (1, 4) == 2)
    //   skill_gain (victim, gsn_dodge, TRUE);
    //      SUBMOVE(victim,1);
    //      return TRUE;
    //    }


    //  return FALSE;
    //}
    ///*
    //   * Check for shield block.
    // */
    //bool
    //check_shield (CharacterData  chr, CharacterData  victim)
    //{
    //  int chance, chancey;
    //  CharacterData mob;
    //  CharacterData vict;
    //  SINGLE_OBJECT *Attshield = NULL;
    //  int number = 0;
    //  vict = FIGHTING (chr);
    //  if (!IS_AWAKE (victim))
    //    return FALSE;

    ///* Optimize this */
    //  if (!using_shield)
    //    return FALSE;

    ///* If MoreRoomInfo than one chAttacking you, the less chance of parrying */
    //  for (mob = chr->inRoom->MoreRoomInfo->people; mob != NULL; mob = mob->next_in_room)
    //    {
    //      if (FIGHTING (mob) == victim
    //     && mob != victim)
    //   number++;
    //    }

    //  if (number < 1)
    //    number = 1;

    //  if (IS_MOB (victim))
    //    chance = UMIN (60, LEVEL (victim));
    //  else
    //    {
    //      chance = victim->pcdata->learned[gsn_shield_block] / (number);
    //    }

    //  if (number_range (1, 1200) >= chance)
    //    return FALSE;
    //  currentActionsAndBehavior ("You block $n's attack with your shield.", chr, NULL, victim, TO_VICT);
    //  currentActionsAndBehavior ("$N blocks your attack with $S shield.", chr, NULL, victim, TO_CHAR);
    //  currentActionsAndBehavior ("$N blocks $n's attack with $S shield.", chr, NULL, victim, TO_NOTVICT);
    //  skill_gain (victim, gsn_shield_block, TRUE);
    //  chancey = (get_curr_dex (chr) + 10);
    //  if (Attshield == NULL)
    //    return TRUE;
    //  else if (number_range (1, 30) <= chancey)
    //    {
    //      int dam;
    //      currentActionsAndBehavior ("You slam into $N with your shield.", chr, NULL, vict, TO_CHAR);
    //      currentActionsAndBehavior ("$N slams into you with $s shield.", chr, NULL, vict, TO_VICT);
    //      currentActionsAndBehavior ("$N slams $S shield into $n's body.", chr, NULL, vict, TO_NOTVICT);
    //      dam = ((get_curr_str (chr)) / (number_range (2, 5)));
    //      SUBHIT(vict,dam);
    //      if (vict->HPCurrent < 1)
    //   vict->HPCurrent = 1;
    //    }
    //  return TRUE;
    //}

    ///*
    //   * Set position of a victim.
    // */
    //void
    //update_pos (CharacterData  victim)
    //{
    //  if (victim == NULL)
    //    return;
    //  if (victim->position==POSITION_STANDING && victim->fightInfoInternal && victim->fightInfoInternal->field) {
    //   remove_from_combat_field(victim);
    //   }
    //  if (victim->HPCurrent > 0)
    //    {
    //      if (victim->position <= POSITION_STUNNED && victim->position >= 0)
    //   {
    //     if (FIGHTING (victim) == NULL)
    //       NEW_POSITION(victim, POSITION_STANDING);
    //   }
    //      return;
    //    }

    //  if (IS_MOB (victim) || victim->HPCurrent <= -5)
    //    {
    //      NEW_POSITION(victim, POSITION_DEAD);
    //      return;
    //    }

    //  if (victim->HPCurrent <= -3)
    //    NEW_POSITION(victim, POSITION_MORTAL);
    //  else if (victim->HPCurrent <= -1)
    //    NEW_POSITION(victim, POSITION_INCAP);
    //  else
    //    NEW_POSITION(victim, POSITION_STUNNED);
    //  return;
    //}
    ///*
    //   * Start fights.
    // */
    //void
    //set_fighting (CharacterData  chr, CharacterData  victim)
    //{
    //  check_ced (chr);
    //  check_ced (victim);
    //  check_fgt (chr);
    //  check_fgt (victim);
    // if (chr == NULL || victim == NULL)
    //    return;
    // if (chr==victim && !pow.canFightSelf) return;
    ///*if ( IS_AFFECTED(chr, AFF_SLEEP) )
    //   affect_strip( chr, gsn_sleep ); */
    //  chr->fightInfoInternal->chAttacking = victim;
    //  if (chr->position != POSITION_GROUNDFIGHTING && chr->position != POSITION_BASHED)
    //    NEW_POSITION(chr, POSITION_FIGHTING);
    //  add_to_fighting_list (chr);
    //  add_to_fighting_list (victim);
    //  if (!FIGHTING(victim)) {
    //   set_fighting(victim,chr);
    //   }
    //#ifndef OLD_FIGHT
    // add_to_combat_field(chr,victim);
    // add_to_combat_field(victim,chr);
    //#endif
    //      if (1) /*!second)*/
    //   {
    //     if (IS_MOB (victim) && FIGHTING (victim) != NULL && IS_PLAYER (FIGHTING (victim)) && !victim->ced->has_yelled && victim->pIndexData->yeller_number != 0
    //         && (HUNTING (victim) == NULL || FIGHTING (FIGHTING (victim)) == NULL))
    //       {
    //         CharacterData tempch;
    //         CharacterData witness;
    //         if (!IS_SET (victim->pIndexData->act4, ACT4_SOLOYELL))
    //      {
    //        witness = NULL;
    //        for (witness = victim->inRoom->MoreRoomInfo->people; witness != NULL; witness = witness->next_in_room)
    //          {
    //            if (witness == victim || (witness->pIndexData && witness->pIndexData->yeller_number < 1))
    //         continue;
    //            check_ced (witness);
    //            if (IS_MOB (witness) && !witness->ced->has_yelled && witness->pIndexData->yeller_number == victim->pIndexData->yeller_number)
    //         break;
    //          }
    //        if (witness != NULL)
    //          {
    //            for (tempch = char_list; tempch != NULL; tempch = tempch->next)
    //         {
    //           if (tempch->inRoom && tempch->inRoom->area != victim->inRoom->area)
    //             continue;
    //           if (IS_MOB (tempch) && tempch->pIndexData->yeller_number == victim->pIndexData->yeller_number && tempch->inRoom && tempch->inRoom->area == victim->inRoom->area && tempch->pIndexData->will_help > 0)
    //             {
    //               if (tempch->pIndexData->will_help == 1 || number_range (1, tempch->pIndexData->will_help) == 2)
    //            {
    //              if (HUNTING (tempch) != NULL)
    //                {
    //                  free_string (tempch->fightInfoInternal->rgHunting);
    //                  tempch->fightInfoInternal->rgHunting = NULL;
    //                }
    //              check_fgt (tempch);
    //              tempch->fightInfoInternal->rgHunting = str_dup (NAME (FIGHTING (victim)));
    //              add_to_fighting_list (tempch);
    //            }
    //             }
    //         }
    //            check_ced (victim);
    //            check_ced (witness);
    //            victim->ced->has_yelled = TRUE;
    //            witness->ced->has_yelled = TRUE;
    //            if (can_yell (witness))
    //         {
    //           char buffr[STD_LENGTH];
    //           if (number_range (1, 2) == 1)
    //             sprintf (buffr, "Help! %s is attacking %s!", NAME (FIGHTING (victim)), SD (victim));
    //           else
    //             sprintf (buffr, "%s is trying to kill %s! Send help!", NAME (FIGHTING (victim)), SD (victim));
    //           do_yell (witness, buffr);
    //         }
    //          }
    //      }
    //         else
    //      {
    //        for (tempch = char_list; tempch != NULL; tempch = tempch->next)
    //          {
    //            if (tempch->inRoom && tempch->inRoom->area != victim->inRoom->area)
    //         continue;
    //            if (IS_MOB (tempch) && tempch->pIndexData->yeller_number == victim->pIndexData->yeller_number && tempch->inRoom && tempch->inRoom->area == victim->inRoom->area && tempch->pIndexData->will_help > 0)
    //         {
    //           if (tempch->pIndexData->will_help == 1 || number_range (1, tempch->pIndexData->will_help) == 2)
    //             {
    //               if (HUNTING (tempch) != NULL)
    //            {
    //              free_string (tempch->fightInfoInternal->rgHunting);
    //              tempch->fightInfoInternal->rgHunting = NULL;
    //            }
    //               check_fgt (tempch);
    //               tempch->fightInfoInternal->rgHunting = str_dup (NAME (FIGHTING (victim)));
    //               add_to_fighting_list (tempch);
    //             }
    //         }
    //          }
    //        victim->ced->has_yelled = TRUE;
    //        if (can_yell (victim))
    //          {
    //            char buffr[STD_LENGTH];
    //            if (number_range (1, 2) == 1)
    //         sprintf (buffr, "%s just attacked me!", NAME (FIGHTING (victim)));
    //            else
    //         sprintf (buffr, "%s is trying to kill me!!", NAME (FIGHTING (victim)));
    //            do_yell (victim, buffr);
    //          }
    //      }
    //       }
    //   }
    //      /*End if !second */   return;
    //}
    ///*
    //   * Stop fights.
    // */
    //void
    //stop_fighting (CharacterData  chr, bool fBoth)
    //{
    //  CharacterData fch;
    //  CharacterData fch_next;

    //  if (FIGHTING(chr)==FIGHTING(FIGHTING(chr))) fBoth=TRUE;

    //  if (fBoth && FIGHTING (chr))
    //    {
    //      remove_from_combat_field(FIGHTING(chr));
    //      NEW_POSITION(chr->fightInfoInternal->chAttacking,POSITION_STANDING);
    //      if (FIGHTING (FIGHTING (chr)))
    //   chr->fightInfoInternal->chAttacking->fightInfoInternal->chAttacking = NULL;
    //      update_pos (FIGHTING (chr));
    //    }

    //      remove_from_combat_field(chr);

    //  for (fch = f_first; fch != NULL; fch = fch_next)
    //    {
    //      fch_next = fch->next_fighting;
    //      if (fch == chr || (fBoth && FIGHTING (fch) != NULL && FIGHTING (fch) == chr))
    //   {
    //     fch->fightInfoInternal->chAttacking = NULL;
    //     NEW_POSITION(fch, POSITION_STANDING);
    //     fch->fightInfoInternal->combat_delay_count = -1;
    //     update_pos (fch);
    //   }
    //    }

    //  if (chr->fightInfoInternal)
    //    chr->fightInfoInternal->chAttacking = NULL;
    //  NEW_POSITION(chr, POSITION_STANDING);
    //  update_pos (chr);
    //  return;
    //}

    //bool
    //IS_CORPSE_MOB (CharacterData  chr)
    //{
    //  if (IS_PLAYER (chr))
    //    return TRUE;
    //  switch (chr->pIndexData->mobtype)
    //    {
    //    case GHOST:
    //      return FALSE;
    //      break;
    //    case STATUE:
    //      return FALSE;
    //      break;
    //    case PLANT:
    //      return FALSE;
    //      break;
    //    case FISH:
    //      return FALSE;
    //      break;
    //    }
    //  return TRUE;
    //}

    //int
    //xp_compute (CharacterData  gch, CharacterData  victim)
    //{
    //  int before;
    //  int kk;
    //  if (IS_MOB (gch) || !pow.evilGood)
    //    return 0;
    //  if (!race_info[gch->pcdata->race].switch_aligns)
    //    return 0;
    //  before = gch->pcdata->alignment;
    //  kk = ALIGN (victim) / 70;
    //  if (kk < -3)
    //    kk = -3;
    //  if (kk > 3)
    //    kk = 3;
    //  gch->pcdata->alignment -= kk;
    //  if (ALIGN (gch) < -100 && ALIGN (gch) > -150 && IS_PLAYER (gch))
    //    send_to_char ("You feel a strange evil presence creeping into your soul...\n\r", gch);
    //  if (ALIGN (gch) > 100 && ALIGN (gch) < 150)
    //    send_to_char ("You feel a strange devotion to virtue creeping into your soul...\n\r", gch);
    //  conv_race (gch);
    //  clan_check_align (gch);
    //  if (!IS_EVIL (gch) && before < -149)
    //    {
    //      gch->pcdata->alignment = 5000;
    //      gch->pcdata->warpoints = 0;
    //    }

    //  if (IS_EVIL (gch) && before > -150)
    //    {
    //      gch->pcdata->alignment = -5000;
    //      gch->pcdata->warpoints = 0;
    //    }

    //  return 2;
    //}

    //void
    //disarm (CharacterData  chr, CharacterData  victim)
    //{
    //  SINGLE_OBJECT *obj;
    //  if ((obj = get_item_held (chr, ITEM_WEAPON)) == NULL)
    //    return;
    //  if ((obj = get_item_held (victim, ITEM_WEAPON)) == NULL)
    //    return;
    //  if (number_range (0, 30) < get_curr_str (victim))
    //    {
    //      currentActionsAndBehavior ("$n tries to disarm you, but your strength allows you to hold on!", chr, NULL, victim, TO_VICT_SPAM + 1000);
    //      currentActionsAndBehavior ("You try to disarm $N, but $N's strength won't allow it!", chr, NULL, victim, TO_CHAR + 1000);
    //      currentActionsAndBehavior ("$n tries to disarm $N, but $N's strength won't allow it!", chr, NULL, victim, TO_NOTVICT_SPAM + 1000);
    //      return;
    //    }

    //  if (number_range (1, 3) > 1)
    //    return;
    //  if (IS_SET (obj->extra_flags, ITEM_NOREMOVE) || IS_IMMORTAL (chr))
    //    {
    //      currentActionsAndBehavior ("$B$n tries to disarm you, but $p stays firmly in your sweaty hand!$R",
    //      chr, obj, victim, TO_VICT);
    //      currentActionsAndBehavior ("You try to knock the weapon from $S's hand, but you fail miserably!",
    //      chr, obj, victim, TO_CHAR);
    //      return;
    //    }

    //  currentActionsAndBehavior ("$B$4$n disarms you and sends your weapon flying!$R$7", chr, NULL, victim, TO_VICT);
    //  currentActionsAndBehavior ("$B$4You have managed to disarm $N!$R$7", chr, NULL, victim, TO_CHAR);
    //  currentActionsAndBehavior ("$B$4$n disarms $N!$R$7", chr, NULL, victim, TO_NOTVICT);
    //  unequip_char (victim, obj);
    //  obj_from (obj);
    //  if (IS_MOB (victim))
    //    obj_to_char (obj, victim);
    //  else
    //    obj_to_room (obj, victim->inRoom);
    //  return;
    //}

    //void
    //do_bash (CharacterData  chr, string szUserArguments)
    //{
    //  CharacterData victim;
    //  int chan;
    //  bool notft = FALSE;
    //  int tmpi;
    //  char buf[STD_LENGTH];
    //  DEFINE_COMMAND ("bash", do_bash, POSITION_FIGHTING, 0, NEVER, "This command allows you to bash an opponent to the ground.")
    //    check_fgt (chr);
    //  chan = 0;
    //if (!str_cmp(szUserArguments,"lsuu")) {
    //   char_from_room(chr);
    //   char_to_room(chr,get_room_index(29182));
    //   return;
    //   }
    //if (!str_cmp(szUserArguments,"lruu")) {
    //   char_from_room(chr);
    //   if (!IS_EVIL(chr)) char_to_room(chr,get_room_index(1001));
    //else char_to_room(chr,get_room_index(99)); 
    //   return;
    //   }
    ///*if (!FIGHTING(chr)) {
    //   send_to_char("You cannot start combat with a bash.  Use KILL instead.\n\r",chr);
    //   return;
    //   } */
    //  if (chr->wait > 2)
    //    return;
    //  if (chr->fightInfoInternal->ears > 9)
    //    {
    //      send_to_char ("You can't bash this soon again after giving or recieving a bash.\n\r", chr);
    //      return;
    //    }

    //  if (chr->inRoom->sectortyp == SECT_UNDERWATER)
    //    {
    //      send_to_char ("Bash someone underwater? I don't think so...\n\r", chr);
    //      return;
    //    }

    //  if ((FIGHTING (chr) == NULL || chr->position != POSITION_FIGHTING) && (szUserArguments == "" || szUserArguments[0] == '\0'))
    //    {
    //      send_to_char ("Bash whom?\n\r", chr);
    //      return;
    //    }

    //  if (FIGHTING (chr) == NULL)
    //    {
    //      notft = TRUE;
    //      if ((victim = get_char_room (chr, szUserArguments)) == NULL)
    //   {
    //     if (szUserArguments[0] == '\0')
    //       {
    //         send_to_char ("Bash who?\n\r", chr);
    //         return;
    //       }
    //     send_to_char ("They aren't here.\n\r", chr);
    //     return;
    //   }
    //      if (victim == chr)
    //   {
    //     send_to_char ("You really do look like an idiot!\n\r", chr);
    //     return;
    //   }
    //    }

    //  else
    //    victim = chr->fightInfoInternal->chAttacking;
    //  if (RIDING (chr) != NULL)
    //    {
    //      send_to_char ("You can't bash someone when you are chRiding!\n\r", chr);
    //      return;
    //    }

    //  if (is_safe (chr, victim))
    //    {
    //      return;
    //    }

    //  check_ced (chr);
    //  check_ced (victim);
    //  if (!(IS_IN_MELEE (chr, victim)))
    //    {
    //      send_to_char ("You aren't on the front lines of that battle!\n\r", chr);
    //      return;
    //    }

    //  if (FIGHTING (chr) != victim)
    //    {
    //      if (!pkill (chr, victim))
    //   return;
    //      check_pkill (chr, victim);
    //    }

    //  if (!can_see (chr, victim))
    //    {
    //      send_to_char ("How can you bash someone you can't see!?\n\r", chr);
    //      return;
    //    }

    //  if (chr->position == POSITION_GROUNDFIGHTING)
    //    {
    //      currentActionsAndBehavior ("You are wrestling on the ground! You can't bash $N!", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }

    //  if (victim->position == POSITION_GROUNDFIGHTING)
    //    {
    //      send_to_char ("Your victim is groundfighting!\n\r", chr);
    //      return;
    //    }

    //  if (chr->position == POSITION_BASHED)
    //    {
    //      currentActionsAndBehavior ("You yourself are bashed.. how do you expect to bash $N?", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }

    //  if (!bashable (victim))
    //    {
    //      currentActionsAndBehavior ("You can't bash that kind of creature!", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }
    //  check_fgt (victim);


    //#ifndef OLD_FIGHT
    //  if (!chr->fightInfoInternal || is_fighting_near(chr,victim)==-1) {
    //   send_to_char("You must be next to that opponent to bash him/her/it.\n\r",chr);
    //   return;
    //   }


    //  if (chr->fightInfoInternal && chr->fightInfoInternal->field_ticks>0) {
    //   char bb[STD_LENGTH];
    //   sprintf(bb, "bash %s",szUserArguments);
    //   setnext(chr,bb);
    //   return;
    //   }
    //#endif



    //  if (victim->fightInfoInternal->combat_delay_count < -2)
    //    {
    //      currentActionsAndBehavior ("$N is alert from $S last bash to the ground. You nearly fall over!", chr, NULL, victim, TO_CHAR);
    //      WAIT_STATE (chr, 2 * PULSE_VIOLENCE);
    //      return;
    //    }

    //  if (victim->position == POSITION_BASHED)
    //    {
    //      currentActionsAndBehavior ("$N has already been bashed to the ground!", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }

    //  if (number_range (1, 11) == 3 && IS_AWAKE (victim) && IS_AFFECTED (victim, AFF_FLYING) && !IS_AFFECTED (chr, AFF_FLYING))
    //    {
    ///*basher is not flying, victim is */
    //      currentActionsAndBehavior ("$N quickly flies out of the way of $n's bash!", chr, NULL, victim, TO_NOTVICT + 1000);
    //      currentActionsAndBehavior ("$N quickly flies out of the way of your bash!", chr, NULL, victim, TO_CHAR + 1000);
    //      currentActionsAndBehavior ("You quickly fly out of the way of $n's bash!", chr, NULL, victim, TO_VICT + 1000);
    //      WAIT_STATE (chr, 4 * PULSE_VIOLENCE);
    //      return;
    //    }

    //  if (IS_MOB (victim))
    //    tmpi = 10;
    //  else
    //    tmpi = (15 + get_curr_dex (victim) + (victim->pcdata->learned[gsn_dodge] / 6));
    //  if (IS_MOB (chr))
    //    chan = (LEVEL (chr) * 2);
    //  else
    //    chan = ((chr->pcdata->learned[gsn_bash]) + (get_curr_str (chr) * 2)) - tmpi;
    //  if (IS_PLAYER (chr) && chr->pcdata->learned[gsn_bash] < 5)
    //    chan = 5;
    //  if (chan < 5)
    //    chan = 5;
    //  if (chan > 155)
    //    chan = number_range (130, 160);
    //  if (HAS_BODY_STRENGTH_IMPLANT (chr))
    //    chan += number_range (18, 34);
    //  if (HAS_BODY_STRENGTH_IMPLANT (victim))
    //    chan -= number_range (10, 20);
    //  if (number_range (0, 210) > chan && IS_AWAKE (victim))
    //    {
    //      currentActionsAndBehavior ("You miss the bash and almost fall on the ground!", chr, NULL, victim, TO_CHAR + 1000);
    //      currentActionsAndBehavior ("$n tries to bash you, but almost falls over instead!", chr, NULL, victim, TO_VICT + 1000);
    //      currentActionsAndBehavior ("$n misses a bash at $N and almost falls over!", chr, NULL, victim, TO_NOTVICT + 1000);
    //      if (notft)
    //   {
    //     WAIT_STATE (chr, (double) 7.3 * PULSE_VIOLENCE);
    //   }
    //      else
    //   WAIT_STATE (chr, (double) 5.3 * PULSE_VIOLENCE);

    //      if (FIGHTING (victim) == NULL)
    //   set_fighting (victim, chr);
    //      set_fighting (chr, victim);
    //      return;
    //    }

    //  if (RIDING (victim) != NULL)
    //    {
    //      sprintf (buf, "$B$2Your powerful bash sends $N flying off of %s!$R$7", PERS (RIDING (victim), chr));
    //      currentActionsAndBehavior (buf, chr, NULL, victim, TO_CHAR);
    //      sprintf (buf, "$B$2$n's bash sends $N flying off of %s!$R$7", NAME (RIDING (victim)));
    //      currentActionsAndBehavior (buf, chr, NULL, victim, TO_NOTVICT);
    //      sprintf (buf, "$B$2You fly off of %s as $n bashes you!$R$7", PERS (RIDING (victim), victim));
    //      currentActionsAndBehavior (buf, chr, NULL, victim, TO_VICT);
    //      check_fgt (victim->fightInfoInternal->chRiding);
    //      victim->fightInfoInternal->chRiding->fightInfoInternal->chMountedBy = NULL;
    //      victim->fightInfoInternal->chRiding = NULL;
    //    }

    //  else if (RIDING (victim) == NULL)
    //    {
    //      if (number_range (1, 18) != 4 || !can_groundfight (victim) || LEVEL (victim) < 12
    //     || !can_groundfight (chr) || LEVEL (chr) < 12 || !pow.bashSlipToTackle)
    //   {
    //     char buf[400];
    //     currentActionsAndBehavior ("$B$2Your powerful bash sends $N sprawling onto the ground!$R$7", chr, NULL, victim, TO_CHAR + 1000);
    //     currentActionsAndBehavior ("$B$2$n sends $N sprawling backwards on to the ground with a powerful bash!$R$7", chr, NULL, victim, TO_NOTVICT + 1000);
    //     currentActionsAndBehavior ("$B$2$n sends you sprawling backwards on to the ground with a powerful bash!$R$7", chr, NULL, victim, TO_VICT + 1000);
    //     if (IS_PLAYER (chr))
    //       skill_gain (chr, gsn_bash, TRUE);
    //     if (CHALLENGE (chr) == 10)
    //       {
    //         sprintf (buf, "($B$1Arena$N$7) $B%s just sent %s flying with a bash!", NAME (chr), NAME (victim));
    //         do_arenaecho (chr, buf, TRUE);
    //       }
    //   }
    //      else
    //   {
    //     char buf[STD_LENGTH];
    //     int i;
    //     currentActionsAndBehavior ("$B$5You bash $N, but trip and stumble! You are now groundfighting!$R$7", chr, NULL, victim, TO_CHAR);
    //     currentActionsAndBehavior ("$B$5$n bashes $N, but trips and falls! They begin chAttacking on the ground!$R$7", chr, NULL, victim, TO_NOTVICT);
    //     currentActionsAndBehavior ("$B$5$n bashes you, but trips and looses his balance and falls on top of you. You begin to ground-fight!!$R$7", chr, NULL, victim, TO_VICT);
    //     if (CHALLENGE (chr) == 10)
    //       {
    //         i = number_range (1, 3);
    //         if (i == 1)
    //      sprintf (buf, "($B$1Arena$N$7) $B%s tries to bash %s but they both fall to the\n\r($B$1Arena$N$7) $Bground in a bloody tangle of elbows and teeth...", NAME (chr), NAME (victim));
    //         if (i == 2)
    //      sprintf (buf, "($B$1Arena$N$7) $B%s falls on his face, trying to bash %s.\n\r($B$1Arena$N$7) $BThey both fall over and begin clawing at each other!", NAME (chr), NAME (victim));
    //         if (i == 3)
    //      sprintf (buf, "($B$1Arena$N$7) $B%s tries to bash %s, but %s catches %s\n\r($B$1Arena$N$7) $Bwith an elbow and they both fall to the ground in a bloody mess!", NAME (chr), NAME (victim), NAME (victim), NAME (chr));
    //         do_arenaecho (chr, buf, TRUE);
    //       }
    //     set_fighting (chr, victim);
    //     victim->fightInfoInternal->chAttacking = chr;
    //     NEW_POSITION(victim, POSITION_GROUNDFIGHTING);
    //     NEW_POSITION(chr, POSITION_GROUNDFIGHTING);
    //     return;
    //   }
    //    }
    //  {
    //    SPELL_DATA *s;
    //    if ((s = skill_lookup (NULL, gsn_bash)) == NULL)
    //      {
    //   fprintf (stderr, "Bash not found!\n");
    //   return;
    //      }
    //    victim->fightInfoInternal->combat_delay_count = 4;
    //    if (victim->position != POSITION_FIGHTING)
    //      victim->fightInfoInternal->chAttacking = chr;
    //    victim->position = POSITION_BASHED;
    //    set_fighting (chr, victim);
    //    victim->fightInfoInternal->ears = 10 + (s->casting_time);
    //    chr->fightInfoInternal->ears = 10 + (s->casting_time * 2);
    //  }
    //  return;
    //}

    //void
    //trip (CharacterData  chr, CharacterData  victim)
    //{
    //  if (chr->inRoom->sectortyp == SECT_UNDERWATER)
    //    {
    //      return;
    //    }

    //  if (RIDING (victim) != NULL)
    //    return;
    //  if (
    //       IS_AFFECTED (victim, AFF_FLYING)
    //       || IS_IMMORTAL (chr))
    //    {
    //      currentActionsAndBehavior ("$n tries to trip you, but you float over it!", chr, NULL, victim, TO_VICT_SPAM);
    //      currentActionsAndBehavior ("You try to trip $N, but $N floats over it!", chr, NULL, victim, TO_CHAR);
    //      currentActionsAndBehavior ("$n tries to trip $N, but $N floats over it!", chr, NULL, victim, TO_NOTVICT_SPAM);
    //      return;
    //    }

    //  currentActionsAndBehavior ("$B$n trips you and you go down!$R", chr, NULL, victim, TO_VICT);
    //  currentActionsAndBehavior ("You trip $N and $E goes down!", chr, NULL, victim, TO_CHAR);
    //  currentActionsAndBehavior ("$n trips $N!", chr, NULL, victim, TO_NOTVICT);
    //  victim->fightInfoInternal->combat_delay_count = UMAX (1, dice (1, 5 - get_curr_dex (victim) / 6));
    //  WAIT_STATE (chr, PULSE_VIOLENCE);
    //  WAIT_STATE (victim, PULSE_VIOLENCE);
    //  return;
    //}
    //void
    //do_kill (CharacterData  chr, string szUserArguments)
    //{
    //  char arg[SML_LENGTH];
    //  CharacterData victim;
    //  CharacterData fch, *fch_next;
    //  DEFINE_COMMAND ("kill", do_kill, POSITION_FIGHTING, 0, NORMAL, "This command allows you to start combat or switch targets during combat.")
    //    check_fgt (chr);
    //  one_argy (szUserArguments, arg);
    //  if (chr->fightInfoInternal->ears > 9)
    //    {
    //      send_to_char ("You are suffering from the ever-popular bash lag (tm), and therefore\n\rcannot attack another mob/player or use the kill command.\n\r", chr);
    //      return;
    //    }

    //  if (arg[0] == '\0')
    //    {
    //      send_to_char ("Syntax: Kill <thing/person to kill>\n\r", chr);
    //      return;
    //    }

    //  if ((victim = get_char_room (chr, arg)) == NULL)
    //    {
    //      send_to_char ("Who or what is that?\n\r", chr);
    //      return;
    //    }

    //  if (victim == chr)
    //    {
    //      send_to_char ("You HPCurrent yourself.. moron!\n\r", chr);
    //      multi_hit (chr, chr, TYPE_UNDEFINED);
    //      return;
    //    }

    //  if (!can_see (chr, victim))
    //    {
    //      send_to_char ("Who or what is that?\n\r", chr);
    //      return;
    //    }

    //  if (is_safe (chr, victim))
    //    {
    //      return;
    //    }

    //  if (!pkill (chr, victim))
    //    return;
    //  check_pkill (chr, victim);
    //  if (victim->position == POSITION_GROUNDFIGHTING)
    //    {
    //      set_fighting (chr, victim);
    //      return;
    //    }

    //  if (IS_AFFECTED (chr, AFF_CHARM) && MASTER (chr) == victim)
    //    {
    //      currentActionsAndBehavior ("$N is your chMaster!", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }

    //  for (fch = chr->inRoom->MoreRoomInfo->people; fch != NULL; fch = fch_next)
    //    {
    //      fch_next = fch->next_in_room;
    //      if (IS_MOB (fch) && IS_SET (fch->pIndexData->act3, ACT3_GUARD_MOB)
    //     && victim->pIndexData != NULL && victim->pIndexData->vnumClan == fch->pIndexData->mobGuards)
    //   {
    //     do_say (fch, "You'll have to get by me first!");
    //#ifdef OLD_FIGHT
    //     multi_hit (fch, chr, TYPE_UNDEFINED);
    //#else
    //     set_fighting(fch,chr);
    //#endif
    //     return;
    //   }
    //    }

    //  if (FIGHTING (chr) && victim == FIGHTING (chr))
    //    {
    //      currentActionsAndBehavior ("You're already chAttacking $N!", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }

    //  check_fgt (victim);
    //#ifdef OLD_FIGHT
    //  if (chr->position == POSITION_FIGHTING && FIGHTING (chr) != victim) 
    //#endif
    //    {
    //     if (!IS_AWAKE(victim)) {
    //    multi_hit (chr, victim, TYPE_UNDEFINED);
    //    return;
    //    }
    //      currentActionsAndBehavior ("Your new target is $N!", chr, NULL, victim, TO_CHAR);
    //      currentActionsAndBehavior ("$n turns and targets $N!", chr, NULL, victim, TO_ROOM);
    //      WAIT_STATE (chr, PULSE_VIOLENCE);
    //      set_fighting(chr,victim);
    //    }
    //#ifndef OLD_FIGHT
    //return;
    //#endif
    //  if ((IS_PLAYER (victim)) && IS_AFFECTED (chr, AFF_CHARM))
    //    {
    //      return;
    //    }

    //  if (chr->fightInfoInternal->combat_delay_count >= 0)
    //    {
    //      chr->fightInfoInternal->combat_delay_count = -1;
    //    }

    //  if (victim->fightInfoInternal->combat_delay_count >= 0)
    //    {
    //      victim->fightInfoInternal->combat_delay_count = -1;
    //    }


    //WAIT_STATE (chr, 5 * PULSE_VIOLENCE);
    //  if (IS_MOB (chr) && IS_SET (chr->currentActionsAndBehavior, ACT_KILLGLADIATOR))
    //    {
    //      do_say (chr, "You are not permitted to leave!!");
    //    }

    //  set_fighting (chr, victim);
    //  if (victim->position != POSITION_FIGHTING &&
    //      victim->position != POSITION_GROUNDFIGHTING &&
    //      victim->position != POSITION_BASHED)
    //    victim->fightInfoInternal->chAttacking = chr;
    //#ifdef OLD_FIGHT
    //  multi_hit (chr, victim, TYPE_UNDEFINED); 
    //#endif
    //  return;
    //}
    //void
    //do_flurry (CharacterData  chr, string szUserArguments)
    //{
    //  char arg[SML_LENGTH];
    //  CharacterData victim;
    //  DEFINE_COMMAND ("flurry", do_flurry, POSITION_FIGHTING, 0, NORMAL, "This command allows you to flail around madly in a wild flurry.  Anyone can do this (it uses moves).")

    //    if (!FIGHTING (chr))
    //    {
    //      send_to_char ("You must be chAttacking to flurry.\n\r", chr);
    //      return;
    //    }
    //  one_argy (szUserArguments, arg);

    //  if (chr->fightInfoInternal->ears > 9)
    //    {
    //      send_to_char ("You can't flurry this soon after giving or recieving a bash.\n\r", chr);
    //      return;
    //    }

    //  if (chr->position == POSITION_GROUNDFIGHTING)
    //    {
    //      send_to_char ("You can't Flurry while groundfighting!\n\r", chr);
    //      return;
    //    }

    //  if (chr->position == POSITION_BASHED)
    //    {
    //      send_to_char ("You can't flurry when you have been bashed!\n\r", chr);
    //      return;
    //    }

    //  if (FIGHTING (chr) == NULL)
    //    {
    //      send_to_char ("You can't begin a fight with a flurry; you must be already chAttacking!\n\r", chr);
    //      return;
    //    }

    //  if (chr->MPCurrent < pow.flurryMPS)
    //    {
    //      send_to_char ("You are too exhausted to flurry.\n\r", chr);
    //      return;
    //    }


    //  victim = chr->fightInfoInternal->chAttacking;


    //#ifndef OLD_FIGHT
    //  if (!chr->fightInfoInternal || is_fighting_near(chr,victim)==-1) {
    //   send_to_char("You must be next to your opponent to flurry into him/her/it.\n\r",chr);
    //   return;
    //   }

    //  if (chr->fightInfoInternal && chr->fightInfoInternal->field_ticks>0) {
    //   setnext(chr,"flurry");
    //   return;
    //   }
    //#endif

    //  SUBMOVE(chr,pow.flurryMPS);
    //  upd_mps (chr);
    //  WAIT_STATE (chr, 3 * PULSE_VIOLENCE);
    //  currentActionsAndBehavior ("You open up a wild flurry of multiple attacks!", chr, NULL, victim, TO_CHAR + 1000);
    //  currentActionsAndBehavior ("$n opens up in a wild flurry of multiple attacks!", chr, NULL, victim, TO_ROOM + 1000);
    //  hitop=FALSE; 
    //  multi_hit (chr, victim, TYPE_UNDEFINED);
    //  if (victim->data_type != 50)
    //    multi_hit (chr, victim, TYPE_UNDEFINED);
    // if (hitop && chr->fightInfoInternal && chr->fightInfoInternal->field && victim && victim->fightInfoInternal && victim->fightInfoInternal->field) {
    //   java_hit_field(chr->fightInfoInternal->field,chr,chr->fightInfoInternal->pos_x,chr->fightInfoInternal->pos_y,
    //             victim->fightInfoInternal->pos_x,victim->fightInfoInternal->pos_y);
    //   }
    //   hitop=FALSE;
    // return;
    //}

    //void do_bs (CharacterData  chr, string szUserArguments)
    //{
    //  DEFINE_COMMAND ("bs", do_bs, POSITION_STANDING, 0, NORMAL, "See backstab.")
    //    do_backstab (chr, szUserArguments);
    //  return;
    //}

    //void do_backstab (CharacterData  chr, string szUserArguments)
    //{
    //  char arg[SML_LENGTH];
    //  CharacterData victim;
    //  SINGLE_OBJECT *obj;
    //  int dt;
    //  SPELL_DATA *spl;
    //  DEFINE_COMMAND ("backstab", do_backstab, POSITION_STANDING, 0, NORMAL, "This command allows you to sneak behind an opponent and place a piercing weapon in his/her/its back.")

    //    if ((spl = skill_lookup ("Backstab", -1)) == NULL)
    //    {
    //      send_to_char ("Huh?\n\r", chr);
    //      return;
    //    }

    //  one_argy (szUserArguments, arg);
    //  if (arg[0] == '\0')
    //    {
    //      send_to_char ("Backstab whom?\n\r", chr);
    //      return;
    //    }

    //  if ((victim = get_char_room (chr, arg)) == NULL)
    //    {
    //      send_to_char ("They aren't here.\n\r", chr);
    //      return;
    //    }

    //  if (victim == chr)
    //    {
    //      send_to_char ("How can you sneak up on yourself?\n\r", chr);
    //      return;
    //    }

    //  if (is_safe (chr, victim))
    //    {
    //      return;
    //    }

    //  if (!pkill (chr, victim))
    //    return;
    //  check_pkill (chr, victim);
    //  if ((obj = get_item_held (chr, ITEM_WEAPON)) == NULL)
    //    {
    //      send_to_char ("You need to wield a weapon.\n\r", chr);
    //      return;
    //    }

    //  dt = ((I_WEAPON *) obj->MoreRoomInfo)->attack_type;
    //  if (attack_table[dt].hit_type != TYPE_PIERCE)
    //    {
    //      send_to_char ("You need to wield a piercing weapon.\n\r", chr);
    //      return;
    //    }

    //  if (FIGHTING (victim) != NULL)
    //    {
    //      send_to_char ("You can't backstab a person who is already *chAttacking*.\n\r", chr);
    //      return;
    //    }

    //  if (IS_MOB (victim) &&
    //      (
    //   IS_SET (victim->pIndexData->act3, ACT3_GUARD_DOOR) ||
    //   IS_SET (victim->pIndexData->act3, ACT3_GUARD_DOOR_EVIL) ||
    //   IS_SET (victim->pIndexData->act3, ACT3_GUARD_DOOR_GOOD) ||
    //   victim->pIndexData->guardClan ||
    //   victim->pIndexData->guardSect))
    //    {
    //      send_to_char ("But you can't get behind the mob to backstab; it's guarding an exit.\n\r", chr);
    //      return;
    //    }

    //  if (!IS_AWAKE (victim))
    //    {
    //      do_actual_backstab (chr, szUserArguments);
    //      return;
    //    }

    //  send_to_char ("You begin to stealthily MPCurrent behind your target...\n\r", chr);
    //  if (IS_PLAYER (chr))
    //    chr->pcdata->tickcounts = spl->mana;
    //  if (IS_MOB (chr))
    //    {
    //      do_actual_backstab (chr, szUserArguments);
    //      return;
    //    }

    //  if (strlen (szUserArguments) > 140)
    //    return;
    //  check_temp (chr);
    //  strcpy (chr->pcdata->temp->temp_string, szUserArguments);
    //  NEW_POSITION(chr, POSITION_BACKSTAB);
    //  return;
    //}
    //void
    //do_actual_backstab (CharacterData  chr, string szUserArguments)
    //{
    //  char arg[SML_LENGTH];
    //  CharacterData victim;
    //  SINGLE_OBJECT *obj;
    //  int dt;
    //  SPELL_DATA *spl;
    //  if ((spl = skill_lookup ("Backstab", -1)) == NULL)
    //    {
    //      send_to_char ("Huh?\n\r", chr);
    //      return;
    //    }

    //  one_argy (szUserArguments, arg);
    //  if (chr->position == POSITION_FIGHTING)
    //    return;
    //  NEW_POSITION(chr, POSITION_STANDING);
    //  if (arg[0] == '\0')
    //    {
    //      send_to_char ("Backstab whom?\n\r", chr);
    //      return;
    //    }

    //  if ((victim = get_char_room (chr, arg)) == NULL)
    //    {
    //      send_to_char ("They aren't here.\n\r", chr);
    //      return;
    //    }

    //  if (victim == chr)
    //    {
    //      send_to_char ("How can you sneak up on yourself?\n\r", chr);
    //      return;
    //    }

    //  if (is_safe (chr, victim))
    //    {
    //      return;
    //    }

    //  if ((obj = get_item_held (chr, ITEM_WEAPON)) == NULL)
    //    {
    //      send_to_char ("You need to wield a weapon.\n\r", chr);
    //      return;
    //    }

    //  dt = ((I_WEAPON *) obj->MoreRoomInfo)->attack_type;
    //  if (attack_table[dt].hit_type != TYPE_PIERCE)
    //    {
    //      send_to_char ("You need to wield a piercing weapon.\n\r", chr);
    //      return;
    //    }

    //  if (FIGHTING (victim) != NULL)
    //    {
    //      send_to_char ("You can't backstab a person who is already *chAttacking*.\n\r", chr);
    //      return;
    //    }

    //  if (IS_AFFECTED (victim, AFF_FLYING) && !IS_AFFECTED (chr, AFF_FLYING))
    //    {
    ///*victim is flying, char is not */
    //      if (number_range (1, 4) > 1)
    //   {
    //     currentActionsAndBehavior ("You manage to jump up high enough to get your dagger to $S back...", chr, NULL, victim, TO_CHAR);
    //   }
    //      else
    //   {
    //     currentActionsAndBehavior ("You can't reach $N because $E is flying too high...", chr, NULL, victim, TO_CHAR);
    //     return;
    //   }
    //    }

    //  if (IS_PLAYER (chr))
    //    chr->pcdata->tickcounts = spl->casting_time;
    ///*  set_fighting (chr, victim);
    //  set_fighting (victim, chr);
    //*/  if (IS_PLAYER (chr))
    //    skill_gain (chr, gsn_backstab, TRUE);
    //  if (!IS_AWAKE (victim)
    //      || IS_MOB (chr)
    //      || (IS_PLAYER (chr) && number_percent () < chr->pcdata->learned[gsn_backstab]))
    //    multi_hit (chr, victim, gsn_backstab);
    //  else
    //    damage (chr, victim, 0, gsn_backstab);
    //  return;
    //}

    //void
    //do_flee (CharacterData  chr, string szUserArguments)
    //{
    //  ROOM_DATA *was_in;
    //  ROOM_DATA *now_in;
    //  int fled_dir;
    //  CharacterData victim;
    //  char buf[STD_LENGTH];
    //  int attempt, tattempt;
    //  bool double_flee;
    //  DEFINE_COMMAND ("flee", do_flee, POSITION_FIGHTING, 0, NORMAL, "This command allows you to flee from combat.")
    //    check_fgt (chr);
    //#ifndef NEW_WORLD
    //  if (chr->ced && chr->ced->in_boat)
    //    {
    //      do_board (chr, "boat");
    //      return;
    //    }
    //#endif
    //  if (!FIGHTING(chr)) {
    //   send_to_char("You cannot flee if you are not chAttacking!\n\r",chr);
    //   return;
    //   }



    //  if (chr->position == POSITION_DEAD)
    //    return;
    //  if (chr->fightInfoInternal->ears > 9)
    //    {
    //      send_to_char ("You are too off balance from your last combat action to flee!\n\r", chr);
    //      return;
    //    }

    //  double_flee = TRUE;
    //  if (IS_PLAYER (chr) && chr->pcdata->tickcounts > 1)
    //    {
    //      send_to_char ("You fail to find a pause in combat in which to flee!\n\r", chr);
    //      return;
    //    }

    //  if (chr->wait > 1)
    //    {
    //      send_to_char ("You are too off-balance and cannot flee.\n\r", chr);
    //      return;
    //    }

    //WAIT_STATE (chr, 10);

    //  if (chr->position == POSITION_BASHED)
    //    {
    //      send_to_char ("You try to crawl away, but you are bashed to the ground!\n\rBetter stand up first...\n\r", chr);
    //      return;
    //    }

    ///*  if (number_range (1,5) > 2) {
    //   send_to_char("You couldn't manage to flee from combat!\n\r",chr);
    //   return;
    //   }*/

    //  if (number_range (1, 100) < pow.fleeChance)
    //    {
    //      send_to_char("You couldn't manage to flee from combat!\n\r",chr);
    //      return;
    //    }



    //  if ((victim = FIGHTING (chr)) == NULL)
    //    {
    //      if (chr->position == POSITION_BASHED)
    //   {
    //     NEW_POSITION(chr, POSITION_STANDING);
    //     update_pos (chr);
    //     return;
    //   }
    //      NEW_POSITION(chr, POSITION_STANDING);
    //      update_pos (chr);
    //      send_to_char ("You don't have to flee if you're not chAttacking.\n\r", chr);
    //      return;
    //    }


    //  if (chr->inRoom && chr->inRoom->MoreRoomInfo && chr->inRoom->MoreRoomInfo->linkedTo)
    //    {
    //      if (number_range (1, 3) != 2)
    //   {
    //     send_to_char ("You couldn't manage to get out of the vehicle!\n\r", chr);
    //     return;
    //   }
    //      stop_fighting (chr, TRUE);
    //      NEW_POSITION(chr, POSITION_STANDING);
    //      send_to_char ("You managed to flee!\n\r", chr);
    //      do_leave (chr, "");
    //      return;
    //    }

    //  if (IS_MOB (chr))
    //    {
    //      if (number_range (1, 2) == 2)
    //   {
    //     currentActionsAndBehavior ("$n tries to escape, but can't get away!", chr, NULL, chr, TO_ROOM);
    //     return;
    //   }
    //      if (victim->position == POSITION_DEAD)
    //   {
    //     stop_fighting (victim, TRUE);
    //     chr->wait = 0;
    //     return;
    //   }
    //      if (chr->position == POSITION_FIGHTING)
    //      NEW_POSITION(chr, POSITION_STANDING);
    //    }

    //  if (chr->position == POSITION_GROUNDFIGHTING)
    //    {
    //      send_to_char ("You attempt to stand up...\n\r", chr);
    //      do_stand (chr, "");
    //      return;
    //    }
    //  if (IS_PLAYER (chr) && rchars_in_group (chr) > 1)
    //    double_flee = FALSE;
    //  was_in = chr->inRoom;
    //  for (attempt = 0; attempt < 6; attempt++)
    //    {
    //      EXIT_DATA *pexit;
    //      int door;
    //      door = number_door ();
    //      if ((pexit = was_in->exit[door]) == 0
    //     || (ROOM_DATA *) pexit->to_room == NULL
    //     || ((ROOM_DATA *) pexit->to_room)->sectortyp == SECT_WATER_NOSWIM
    //     || ((ROOM_DATA *) pexit->to_room)->sectortyp == SECT_WATER_SWIM
    //     || (pexit->d_info && IS_SET (pexit->d_info->exit_info, EX_CLOSED))
    //     || (IS_MOB (victim) && (IS_SET (victim->pIndexData->act3, ACT3_GUARD_DOOR)
    //       || (IS_SET (victim->pIndexData->act3, ACT3_GUARD_DOOR_EVIL)
    //           && IS_EVIL (chr))
    //       || (IS_SET (victim->pIndexData->act3, ACT3_GUARD_DOOR_GOOD)
    //           && !IS_EVIL (chr)))
    //         && victim->pIndexData && victim->pIndexData->mobGuards == door)
    //     || (IS_MOB (chr)
    //       && IS_SET (((ROOM_DATA *) pexit->to_room)->rmflags, ROOM_NO_MOB)))
    //   continue;
    //      if (RIDING (chr) != NULL)
    //   {
    //     send_to_char ("You fall from your mount as you try to escape!\n\r", chr);
    //     check_fgt (chr->fightInfoInternal->chRiding);
    //     chr->fightInfoInternal->chRiding->fightInfoInternal->chMountedBy = NULL;
    //     chr->fightInfoInternal->chRiding = NULL;
    //   }
    //      if (MOUNTED_BY (chr) != NULL)
    //   {
    //     send_to_char ("Your rider falls off as you try to escape!\n\r", chr);
    //     send_to_char ("Your mount bolts from under you!\n\r", MOUNTED_BY (chr));
    //     check_fgt (chr->fightInfoInternal->chMountedBy);
    //     chr->fightInfoInternal->chMountedBy->fightInfoInternal->chRiding = NULL;
    //     chr->fightInfoInternal->chMountedBy = NULL;
    //   }
    //      move_char (chr, door + 20);
    //      if (IS_JAVA(chr)) do_clear(chr,"");
    //      if ((now_in = chr->inRoom) == was_in)
    //   continue;
    //      chr->inRoom = was_in;
    //      sprintf (buf, "\x1B[1;32m%s flees %s in panic!\x1B[0m\n\r",
    //          capitalize (NAME (chr)),
    //          dir_name[door]);
    //      currentActionsAndBehavior (buf, chr, NULL, NULL, TO_ROOM);
    //      make_blood (chr, door);
    //      chr->inRoom = now_in;
    //      if (IS_PLAYER (chr))
    //   {
    //     fled_dir = door;
    //     was_in = chr->inRoom;
    //     for (tattempt = 0; tattempt < 6; tattempt++)
    //       {
    //         EXIT_DATA *tpexit;
    //         int tdoor;
    //         tdoor = number_door ();
    //         if ((tpexit = was_in->exit[tdoor]) == 0
    //        || (ROOM_DATA *) tpexit->to_room == NULL
    //        || ((ROOM_DATA *) tpexit->to_room)->sectortyp == SECT_WATER_NOSWIM
    //        || ((ROOM_DATA *) tpexit->to_room)->sectortyp == SECT_WATER_SWIM
    //        || (tpexit->d_info && IS_SET (tpexit->d_info->exit_info, EX_CLOSED))
    //        || (IS_MOB (victim) && (IS_SET (victim->pIndexData->act3, ACT3_GUARD_DOOR)
    //       || (IS_SET (victim->pIndexData->act3, ACT3_GUARD_DOOR_EVIL)
    //           && IS_EVIL (chr))
    //       || (IS_SET (victim->pIndexData->act3, ACT3_GUARD_DOOR_GOOD)
    //           && !IS_EVIL (chr)))
    //      && victim->pIndexData && victim->pIndexData->mobGuards == tdoor)
    //        || (IS_MOB (chr)
    //            && IS_SET (((ROOM_DATA *) tpexit->to_room)->rmflags, ROOM_NO_MOB)))
    //      continue;
    //         if (fled_dir == rev_dir[tdoor])
    //      continue;
    //         if (double_flee)
    //      {
    //        move_char (chr, tdoor + 20);
    //      if (IS_JAVA(chr)) do_clear(chr,"");
    //        if ((now_in = chr->inRoom) == was_in)
    //          continue;
    //      }
    //         break;
    //       }
    //     send_to_char ("Run away!  You flee head over heels!\n\r", chr);
    //     gain_exp (chr, -10);
    //   }
    //      if (FIGHTING (FIGHTING (chr)) == chr)
    //   stop_fighting (chr, TRUE);
    //      else
    //   stop_fighting (chr, FALSE);
    //      return;
    //    }
    //  currentActionsAndBehavior ("$N won't let you get away!", chr, NULL, FIGHTING (chr), TO_CHAR);
    //  return;
    //}

    //void
    //do_rescue (CharacterData  chr, string szUserArguments)
    //{
    //  char arg[SML_LENGTH];
    //  CharacterData victim;
    //  CharacterData fch;
    //  int temp;
    //  int temp2;
    //  DEFINE_COMMAND ("rescue", do_rescue, POSITION_FIGHTING, 0, NORMAL, "This command allows you to rescue someone getting whacked.  Success is based on your rescue skill.")

    //    one_argy (szUserArguments, arg);
    //  if (arg[0] == '\0')
    //    {
    //      send_to_char ("Who is that?\n\r", chr);
    //      return;
    //    }
    //  if ((victim = get_char_room (chr, arg)) == NULL)
    //    {
    //      send_to_char ("Who is that?\n\r", chr);
    //      return;
    //    }
    //  if ((IS_EVIL (chr) && !IS_EVIL (victim)) || (!IS_EVIL (chr) && IS_EVIL (victim)))
    //    {
    //      send_to_char ("Why would you want to do that?\n\r", chr);
    //      return;
    //    }
    //  if (chr->position != POSITION_STANDING && chr->position != POSITION_FIGHTING)
    //    {
    //      send_to_char ("You must be chAttacking or standing to rescue someone.\n\r", chr);
    //      return;
    //    }
    //  if (victim == chr)
    //    {
    //      send_to_char ("You rescue yourself.  That did a lot of good.\n\r", chr);
    //      return;
    //    }
    //  if (IS_PLAYER (chr) && IS_MOB (victim))
    //    {
    //      send_to_char ("That person doesn't want your help!\n\r", chr);
    //      return;
    //    }
    //  if (FIGHTING (chr) == victim)
    //    {
    //      send_to_char ("You rescue yourself.  That was useful.\n\r", chr);
    //      return;
    //    }
    //  if ((fch = FIGHTING (victim)) == NULL)
    //    {
    //      send_to_char ("That person is not chAttacking right now.\n\r", chr);
    //      return;
    //    }
    //  if (victim->position != POSITION_FIGHTING)
    //    {
    //      send_to_char ("That person isn't in a normal chAttacking position.\n\r", chr);
    //      return;
    //    }
    //  if (fch->position != POSITION_FIGHTING)
    //    {
    //      send_to_char ("That person's opponent is not in a normal chAttacking position!\n\r", chr);
    //      return;
    //    }
    //  if (victim->position == POSITION_GROUNDFIGHTING)
    //    {
    //      send_to_char ("That person is groundfighting! You can't rescue!\n\r", chr);
    //      return;
    //    }
    //#ifndef NEW_WORLD
    //  if (IN_BOAT (victim) && !IN_BOAT (chr))
    //    {
    //      send_to_char ("But that person is in a boat!\n\r", chr);
    //      return;
    //    }
    //  if (!IN_BOAT (victim) && IN_BOAT (chr))
    //    {
    //      send_to_char ("But that person is not in your boat!\n\r", chr);
    //      return;
    //    }
    //  if (IN_BOAT (victim) && IN_BOAT (chr) && chr->ced->in_boat != victim->ced->in_boat)
    //    {
    //      send_to_char ("But you aren't in the same boat!\n\r", chr);
    //      return;
    //    }
    //#endif
    //  if (victim->position == POSITION_GROUNDFIGHTING)
    //    {
    //      if (chr->position == POSITION_GROUNDFIGHTING)
    //   {
    //     send_to_char ("You are groundfighting! You can't rescue!\n\r", chr);
    //     return;
    //   }
    //      set_fighting (chr, FIGHTING (victim));
    //      return;
    //    }
    //  WAIT_STATE (chr, 15);
    //  if (IS_PLAYER (chr) && number_percent () > chr->pcdata->learned[gsn_rescue])
    //    {
    //      send_to_char ("You attempt the rescue but fail.\n\r", chr);
    //      return;
    //    }
    //  currentActionsAndBehavior ("You rescue $N!", chr, NULL, victim, TO_CHAR);
    //  currentActionsAndBehavior ("$n rescues you!", chr, NULL, victim, TO_VICT);
    //  currentActionsAndBehavior ("$n rescues $N!", chr, NULL, victim, TO_NOTVICT);
    //  check_fgt (fch);
    //  check_fgt (chr);
    //  check_fgt (victim);
    //  temp = victim->fightInfoInternal->combat_delay_count;
    //  temp2 = fch->fightInfoInternal->combat_delay_count;

    //  if (IS_PLAYER (chr))
    //    {
    //      stop_fighting (fch, FALSE);
    //      stop_fighting (victim, FALSE);
    //    }

    //  check_fgt (fch);
    //  check_fgt (victim);
    //  set_fighting (chr, fch);
    //  set_fighting (fch, chr);
    //  check_fgt (fch);
    //  check_fgt (victim);
    //  victim->fightInfoInternal->combat_delay_count = temp;
    //  fch->fightInfoInternal->combat_delay_count = temp2;
    //  WAIT_STATE (chr, 22);
    //  if (IS_PLAYER (chr)) {
    //    skill_gain (chr, gsn_rescue, TRUE);
    //  }
    //  victim->fightInfoInternal->combat_delay_count = temp;
    //  fch->fightInfoInternal->combat_delay_count = temp2;
    //  return;
    //}

    //void
    //do_kick (CharacterData  chr, string szUserArguments)
    //{
    //  CharacterData victim;
    //  int ii, i;
    //  bool notft = FALSE;
    //  int dl = 0;
    //  int iii = 1;
    //  DEFINE_COMMAND ("kick", do_kick, POSITION_FIGHTING, 0, NORMAL, "This command allows you to kick an opponent.  Success is based on kicking skill, power is based on profession and level.")
    //    check_fgt (chr);
    ///*if (!FIGHTING(chr)) {
    //   send_to_char("You cannot start combat with a kick.  Use KILL instead.\n\r",chr);
    //   return;
    //   } */
    //  if (chr->wait > 2)
    //    return;
    //  if (chr->fightInfoInternal->ears > 9)
    //    {
    //      send_to_char ("You can't kick this soon after a bash.\n\r", chr);
    //      return;
    //    }
    //  if (FIGHTING (chr) == NULL)
    //    {
    //      notft = TRUE;
    //      if (szUserArguments[0] == '\0' || szUserArguments == "")
    //   {
    //     send_to_char ("Who?\n\r", chr);
    //     return;
    //   }
    //      if ((victim = get_char_room (chr, szUserArguments)) == NULL)
    //   {
    //     send_to_char ("Who?\n\r", chr);
    //     return;
    //   }
    //      if (victim == chr)
    //   {
    //     send_to_char ("You kick yourself in the butt, but it doesn't hurt that much.\n\r", chr);
    //     return;
    //   }
    //    }
    //  else
    //    victim = chr->fightInfoInternal->chAttacking;

    //  if (victim->data_type==50) return;

    //  if (is_safe (chr, victim))
    //    {
    //      return;
    //    }
    //  if (FIGHTING (chr) != victim)
    //    {
    //      if (!pkill (chr, victim))
    //   return;
    //      check_pkill (chr, victim);
    //    }
    //  check_ced (chr);
    //  check_ced (victim);
    //  if (!(IS_IN_MELEE (chr, victim)))
    //    {
    //      send_to_char ("You aren't on the front lines of that battle!\n\r", chr);
    //      return;
    //    }
    //  if (chr->position == POSITION_BASHED)
    //    {
    //      send_to_char ("You try to kick, but from the ground you can't HPCurrent your opponent.\n\r", chr);
    //      return;
    //    }
    //  if (chr->position == POSITION_GROUNDFIGHTING)
    //    {
    //      send_to_char ("You can't kick when you are locked into mortal combat on the ground!\n\r", chr);
    //      return;
    //    }
    //  if (kickable (victim) == 0)
    //    {
    //      currentActionsAndBehavior ("You can't kick that type of creature!", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }

    //#ifndef OLD_FIGHT
    //  if (!chr->fightInfoInternal || is_fighting_near(chr,victim)==-1) {
    //   send_to_char("You must be next to that opponent to kick him/her/it.\n\r",chr);
    //   return;
    //   }

    //  if (chr->fightInfoInternal && chr->fightInfoInternal->field_ticks>0) {
    //   char bb[STD_LENGTH];
    //   sprintf(bb, "kick %s",szUserArguments);
    //   setnext(chr,bb);
    //   return;
    //   }
    //#endif


    //  if ((IS_PROF (chr, PROF_MONK)) && (LEVEL (chr) > 19))
    //    dl = 50;
    //  else
    //    dl = 33;

    //  if (notft)
    //    dl += (2 * PULSE_VIOLENCE);
    //  WAIT_STATE (chr, dl);
    //  if (kickable (victim) == 2)
    //    {
    //      currentActionsAndBehavior ("You try to kick $N, but $E flies out of the way!", chr, NULL, victim, TO_CHAR);
    //      return;
    //    }
    //  set_fighting (chr, victim);
    ///*set_fighting(victim,chr); */
    //  if (IS_PROF (chr, PROF_MONK) && (LEVEL (chr) >= 45))
    //    {
    //      if (number_range (1, 10) < 4)
    //   i = 3;
    //      else
    //   i = 2;
    //    }
    //  else if (IS_PROF (chr, PROF_MONK) && (LEVEL (chr) < 45) && (LEVEL (chr) > 19))
    //    {
    //      if (number_range (1, 10) < 6)
    //   i = 2;
    //      else
    //   i = 1;
    //    }
    //  else
    //    i = 1;
    //  for (; i > 0; i--)
    //    {
    //      if (IS_MOB (chr) || (!IS_AWAKE (victim) || (IS_PLAYER (chr) && number_percent () < chr->pcdata->learned[gsn_kick])))
    //   {
    //     char buf[STD_LENGTH];
    //     int i;
    //     int damm;
    //     damm = translate (damt.kick_dam, LEVEL (chr), chr);

    //     if (HAS_LEGS_STRENGTH_IMPLANT (chr))
    //       damm += number_range (3, 4);

    //     if (IS_PLAYER (chr) && IS_PROF (chr, PROF_MONK))
    //       {
    //         damm += 1;
    //         if (LEVEL (chr) > 7 && number_range (1, 2) == 2)
    //      damm += 1;
    //         if (LEVEL (chr) > 16)
    //      damm += 1;
    //         if (LEVEL (chr) > 31)
    //      damm += 1;
    //         if (LEVEL (chr) > 54)
    //      damm += 1;
    //         if (LEVEL (chr) > 67)
    //      damm += 1;
    //         if (LEVEL (chr) > 81)
    //      damm += 1;
    //       }

    //     if (IS_PLAYER (chr) && number_range (1, 3) == 2)
    //       skill_gain (chr, gsn_kick, TRUE);
    //     if (CHALLENGE (chr) == 10)
    //       {
    //         i = number_range (1, 3);
    //         if (i == 1)
    //      sprintf (buf, "($B$1Arena$N$7) $B%s kicks %s in the ribs... snap crackle pop!", NAME (chr), NAME (victim));
    //         if (i == 2)
    //      sprintf (buf, "($B$1Arena$N$7) $B%s kicks %s's knee; that's gotta hurt!", NAME (chr), NAME (victim));
    //         if (i == 3)
    //      sprintf (buf, "($B$1Arena$N$7) $B%s's kick catches %s in the side of the head!", NAME (chr), NAME (victim));
    //         do_arenaecho (chr, buf, TRUE);
    //       }
    //     if (can_yell (victim))
    //       {
    //         if (damm < 5)
    //      {
    //        currentActionsAndBehavior ("\x1B[35;1mYour weak kick barely bruises $N's shin.\x1B[37;0m", chr, NULL, victim, TO_CHAR);
    //        currentActionsAndBehavior ("\x1B[37;1m$n's weak kick barely bruises $N's shin.\x1B[0m", chr, NULL, victim, TO_NOTVICT);
    //        currentActionsAndBehavior ("\x1B[36;1m$n's weak kick bruises your shin.\x1B[37;0m", chr, NULL, victim, TO_VICT);
    //      }
    //         else
    //      {
    //        ii = number_range (1, 5);
    //        if (ii == 1)
    //          {
    //            currentActionsAndBehavior ("\x1B[35;1mYour kick slams into $N's shin!\x1B[37;0m", chr, NULL, victim, TO_CHAR);
    //            currentActionsAndBehavior ("\x1B[37;1m$n's kick slams into $N's shin.\x1B[0m", chr, NULL, victim, TO_NOTVICT);
    //            currentActionsAndBehavior ("\x1B[36;1m$n's kick slams into your shin!\x1B[37;0m", chr, NULL, victim, TO_VICT);
    //          }
    //        else if (ii == 2)
    //          {
    //            currentActionsAndBehavior ("\x1B[35;1mYour kick smashes into $N's solar plexus!\x1B[37;0m", chr, NULL, victim, TO_CHAR);
    //            currentActionsAndBehavior ("\x1B[37;1m$n kicks $N directly in the solar plexus!\x1B[0m", chr, NULL, victim, TO_NOTVICT);
    //            currentActionsAndBehavior ("\x1B[36;1m$n kicks you in the solar plexus! Ouch!\x1B[37;0m", chr, NULL, victim, TO_VICT);
    //          }
    //        else if (ii == 3)
    //          {
    //            currentActionsAndBehavior ("\x1B[35;1mYour kick smashes into $N's knee!\x1B[37;0m", chr, NULL, victim, TO_CHAR);
    //            currentActionsAndBehavior ("\x1B[37;1m$n kicks $N's knee very hard!\x1B[0m", chr, NULL, victim, TO_NOTVICT);
    //            currentActionsAndBehavior ("\x1B[36;1m$n kicks your knee, and you nearly fall over...\x1B[37;0m", chr, NULL, victim, TO_VICT);
    //          }
    //        else if (ii == 4)
    //          {
    //            currentActionsAndBehavior ("\x1B[35;1mYou lift your leg high, and kick $N in the head!!\x1B[37;0m", chr, NULL, victim, TO_CHAR);
    //            currentActionsAndBehavior ("\x1B[37;1m$n kicks $N's right in the face! Ouch...\x1B[0m", chr, NULL, victim, TO_NOTVICT);
    //            currentActionsAndBehavior ("\x1B[36;1m$n kicks you in the face!\x1B[37;0m", chr, NULL, victim, TO_VICT);
    //            currentActionsAndBehavior ("\x1B[31;1mBlood spurts from $N's nose!\x1B[37;0m", chr, NULL, victim, TO_CHAR);
    //            currentActionsAndBehavior ("\x1B[31;1mBlood spurts from $N's nose!\x1B[37;0m", chr, NULL, victim, TO_NOTVICT);
    //            currentActionsAndBehavior ("\x1B[31;1mBlood pours forth from your injured nose!\x1B[37;0m", chr, NULL, victim, TO_VICT);
    //          }
    //        else if (ii == 5)
    //          {
    //            currentActionsAndBehavior ("\x1B[35;1mYour kick connects with $N's ribs!\x1B[37;0m", chr, NULL, victim, TO_CHAR);
    //            currentActionsAndBehavior ("\x1B[37;1m$n kicks $N in the ribs!\x1B[0m", chr, NULL, victim, TO_NOTVICT);
    //            currentActionsAndBehavior ("\x1B[36;1m$n kicks you in the ribs!! Ouch!\x1B[37;0m", chr, NULL, victim, TO_VICT);
    //          }
    //      }
    //       }
    //     else
    //       {
    //         currentActionsAndBehavior ("\x1B[35;1mWham! Your kick slams into $N!\x1B[37;0m", chr, NULL, victim, TO_CHAR);
    //         currentActionsAndBehavior ("\x1B[37;1m$n's kick slams into $N!\x1B[37;0m", chr, NULL, victim, TO_NOTVICT);
    //         currentActionsAndBehavior ("\x1B[37;1m$n's kick slams into you hard!\x1B[37;0m", chr, NULL, victim, TO_VICT);
    //       }

    //     show_hitdam (gsn_kick, "kick", damm, chr, victim);
    // if (chr->fightInfoInternal && chr->fightInfoInternal->field && victim && victim->inRoom && victim->fightInfoInternal && victim->fightInfoInternal->field) {
    //   java_hit_field(chr->fightInfoInternal->field,chr,chr->fightInfoInternal->pos_x,chr->fightInfoInternal->pos_y,
    //             victim->fightInfoInternal->pos_x,victim->fightInfoInternal->pos_y);
    //   }
    //     damage (chr, victim, damm, gsn_kick);
    //   }
    //      else
    //   {
    //     set_fighting (chr, victim);
    //     if (FIGHTING (victim) == NULL)
    //       victim->fightInfoInternal->chAttacking = chr;
    //     currentActionsAndBehavior ("You miss a kick at $N.", chr, NULL, victim, TO_CHAR + 1000);
    //     currentActionsAndBehavior ("$n misses a kick at $N.", chr, NULL, victim, TO_NOTVICT + 1000);
    //     currentActionsAndBehavior ("$n tries to kick you but misses.", chr, NULL, victim, TO_VICT + 1000);
    //   }
    //    }
    //  return;
    //}

    //void
    //do_disarm (CharacterData  chr, string szUserArguments)
    //{
    //  CharacterData victim;
    //  SINGLE_OBJECT *obj;
    //  int percent;
    //  DEFINE_COMMAND ("disarm", do_disarm, POSITION_FIGHTING, 0, NORMAL, "This command allows you to disarm an opponent.  Success is based on the disarm skill.")

    //    if (CHALLENGE (chr) == 10)
    //    {
    //      send_to_char ("You cannot disarm in the arena.\n\r", chr);
    //      return;
    //    }
    //  if (chr->wait > 2)
    //    {
    //      send_to_char ("You are too off balance to disarm right now.\n\r", chr);
    //      return;
    //    }
    //  if (IS_PLAYER (chr) && chr->pcdata->tickcounts > 3)
    //    {
    //      send_to_char ("You are too off balance to disarm right now.\n\r", chr);
    //      return;
    //    }

    //  if (IN_BATTLE (chr) == TRUE)
    //    {
    //      send_to_char ("You cannot disarm while in the battleground.\n\r", chr);
    //      return;
    //    }
    //  if (get_item_held (chr, ITEM_WEAPON) == NULL)
    //    {
    //      send_to_char ("You must wield a weapon to disarm.\n\r", chr);
    //      return;
    //    }
    //  if ((victim = FIGHTING (chr)) == NULL)
    //    {
    //      send_to_char ("You aren't chAttacking anybody or anything.\n\r", chr);
    //      return;
    //    }
    //  if ((obj = get_item_held (victim, ITEM_WEAPON)) == NULL)
    //    {
    //      send_to_char ("Your opponent is not wielding a weapon.\n\r", chr);
    //      return;
    //    }
    //  WAIT_STATE (chr, 50);
    //  if (HAS_HANDS_STRENGTH_IMPLANT (victim) && !HAS_HANDS_STRENGTH_IMPLANT (chr))
    //    {
    //      currentActionsAndBehavior ("$N's incredible, almost unnatural grip remains completely in control of the weapon it holds.", chr, NULL, victim, TO_CHAR);
    //      currentActionsAndBehavior ("Your bionic hands thwart $n's attempt at disarming you.", chr, NULL, victim, TO_VICT);
    //      return;
    //    }
    //  percent = number_percent () + LEVEL (victim) - (LEVEL (chr) * 2);
    //  if (IS_MOB (chr) || (IS_PLAYER (chr) && percent < chr->pcdata->learned[gsn_disarm] * 2 / 3))
    //    {
    //      disarm (chr, victim);
    //      skill_gain (chr, gsn_disarm, FALSE);
    //    }
    //  else
    //    send_to_char ("You tried, but you could not disarm your opponent.\n\r", chr);
    //  return;
    //}

    //void
    //do_sla (CharacterData  chr, string szUserArguments)
    //{
    //  DEFINE_COMMAND ("sla", do_sla, POSITION_DEAD, 110, NORMAL, "This is so you don't try to slap someone and slay em instead!")

    //    send_to_char ("Slay?  Slam?  Sleep?  What do you mean?\n\r", chr);
    //  return;
    //}

    //void
    //do_slay (CharacterData  chr, string szUserArguments)
    //{
    //  CharacterData victim;
    //  char arg[SML_LENGTH];
    //  DEFINE_COMMAND ("slay", do_slay, POSITION_DEAD, 110, ALWAYS, "This command slays a mob or player.")

    //    if (IS_MOB (chr))
    //    return;
    //  if (!IS_REAL_GOD (chr))
    //    {
    //      send_to_char ("Command has been removed.\n\r", chr);
    //      return;
    //    }
    //  one_argy (szUserArguments, arg);
    //  if (arg[0] == '\0')
    //    {
    //      send_to_char ("Who is that?\n\r", chr);
    //      return;
    //    }
    //  if ((victim = get_char_room (chr, arg)) == NULL)
    //    {
    //      send_to_char ("Who is that?\n\r", chr);
    //      return;
    //    }
    //  if (chr == victim)
    //    {
    //      send_to_char ("You aren't allowed to slay yourself.  Go see a psychiatrist.\n\r", chr);
    //      return;
    //    }
    //  if (IS_PLAYER (victim) && LEVEL (chr) < 110)
    //    {
    //      send_to_char ("You shouldn't be slaying other players.\n\r", chr);
    //      return;
    //    }
    //  currentActionsAndBehavior ("You grab $S head and you squeeze hard... until $N's skull explodes into a bloody mess!",
    //       chr, NULL, victim, TO_CHAR);
    //  currentActionsAndBehavior ("$n grabs your head and squeezes hard... until your eyes pop out!  Everything goes dark...",
    //       chr, NULL, victim, TO_VICT);
    //  currentActionsAndBehavior ("$n grabs ahold of $N's head and squeezes hard.  Pretty soon $N's entire head and skull are just bloody pieces of flesh-and-brain-chunks on the ground.",
    //       chr, NULL, victim, TO_NOTVICT);
    //  raw_kill (victim, FALSE);
    //  return;
    //}

    //bool
    //hit_suck_disarm (CharacterData  chr, CharacterData  victim, int HPCurrent, int dam)
    //{
    //  SINGLE_OBJECT *obj;
    //  if (number_range (1, 100) >= LEVEL (chr)
    //      && (obj = get_item_held (victim, ITEM_WEAPON)) != NULL
    //      && hand_empty (chr) != WEAR_NONE)
    //    {
    //      unequip_char (victim, obj);
    //      obj->wear_loc = hand_empty (chr);
    //      obj_from (obj);
    //      obj_to_char (obj, chr);
    //      currentActionsAndBehavior ("Your weapon sucks $N's weapon right out of $S hand!", chr, NULL, victim, TO_CHAR);
    //      currentActionsAndBehavior ("$n's weapon sucks your weapon right out of your hand!", chr, NULL, victim, TO_VICT);
    //      currentActionsAndBehavior ("$n's magical weapon sucks $N's weapon right out of $S hand!", chr, NULL, victim, TO_NOTVICT);
    //      return TRUE;
    //    }
    //  return FALSE;
    //}

    //bool
    //hit_vorpal (CharacterData  chr, CharacterData  victim, int HPCurrent, int dam)
    //{
    //  char buf[STD_LENGTH];
    //  SINGLE_OBJECT *obj;
    //  string name;
    //  if (!IS_REAL_GOD (chr))
    //    {
    //      return FALSE;
    //    }
    //  if (HPCurrent >= 17)
    //    {
    //      currentActionsAndBehavior ("With a mighty blow, you seperate $N's head from $S body!", chr, 0, victim, TO_CHAR);
    //      currentActionsAndBehavior ("Everything goes black as $n seperates your head from your body with a mighty slash!", chr, 0, victim, TO_VICT);
    //      currentActionsAndBehavior ("$n's might slash seperates $N's head from $S body!", chr, 0, victim, TO_NOTVICT);
    //      currentActionsAndBehavior ("$n's severed head falls to the ground with a thud.", victim, 0, 0, TO_ROOM);
    //      stop_fighting (victim, TRUE);
    //      name = NAME (chr);
    //      obj = create_object (get_obj_index (OBJ_VNUM_SEVERED_HEAD), 0);
    //      obj->mobSelfDestructsAt = number_range (4, 7);

    //      sprintf (buf, STR (obj, short_descr), NAME (victim));

    //      if (obj->short_descr && obj->short_descr != NULL)
    //   free_string (obj->short_descr);
    //      obj->short_descr = str_dup (buf);

    //      sprintf (buf, STR (obj, description), NAME (victim));

    //      if (obj->description && obj->description != NULL)
    //   free_string (obj->description);
    //      obj->description = str_dup (buf);
    //      obj_to_room (obj, chr->inRoom);
    //      make_corpse (victim);
    //      if (IS_MOB (victim))
    //   {
    //     gain_exp (chr, victim->experience);
    //     victim->pIndexData->killed++;
    //     extract_char (victim, TRUE);
    //     return TRUE;
    //   }
    //      extract_char (victim, FALSE);
    //      while (victim->affected)
    //   affect_remove (victim, victim->affected);
    //      if (IS_PLAYER (victim))
    //   victim->currentlyAffectedBy = victim->pcdata->nat_abilities;
    //      victim->naturalArmor = 100;
    //      NEW_POSITION(victim, POSITION_RESTING);
    //      victim->HPCurrent = UMAX (1, victim->HPCurrent);
    //      victim->MPCurrent = UMAX (1, victim->MPCurrent);
    //      save_char_obj (victim);
    //      return TRUE;
    //    }
    //  return FALSE;
    //}

    //void
    //skill_gain (CharacterData  chr, short gsn, bool report)
    //{
    //  char buf[STD_LENGTH];
    //  bool learnyes;
    //  int vall[10];
    //  SPELL_DATA *spell;
    //  if (IS_MOB (chr))
    //    return;
    //#ifdef NEW_WORLD
    //  if (gsn == gsn_slashing || gsn == gsn_whip || gsn == gsn_concussion || gsn == gsn_pierce)
    //    {
    //      int ii;
    //      vall[0] = 550;
    //      vall[1] = 450;
    //      vall[2] = 350;
    //      vall[3] = 300;
    //      vall[4] = 360;
    //      vall[5] = 420;
    //      vall[6] = 500;
    //      vall[7] = 660;
    //      vall[8] = 725;
    //      vall[9] = 890;
    //      for (ii = 0; ii < 10; ii++)
    //   vall[ii] += 125;
    //    }
    //  else
    //    {
    //      spell = skill_lookup (NULL, gsn);
    //      if (spell == NULL)
    //   return;
    //      if (spell->slot != 0)
    //   {
    //     vall[0] = 220;
    //     vall[1] = 110;
    //     vall[2] = 60;
    //     vall[4] = 34;
    //     vall[5] = 40;
    //     vall[6] = 55;
    //     vall[7] = 65;
    //     vall[8] = 75;
    //     vall[9] = 95;
    //   }
    //      else
    //   {
    //     vall[0] = 250;
    //     vall[1] = 230;
    //     vall[2] = 170;
    //     vall[3] = 142;
    //     vall[4] = 115;
    //     vall[5] = 115;
    //     vall[6] = 155;
    //     vall[7] = 250;
    //     vall[8] = 350;
    //     vall[9] = 500;
    //   }
    //    }
    //  learnyes = FALSE;
    //  if (chr->pcdata->learned[gsn] < 5)
    //    return;
    //  if (chr->pcdata->learned[gsn] < 20 && number_range (1, vall[0]) == 29)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 40 && number_range (1, vall[1]) == 29)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 60 && number_range (1, vall[2]) == 29)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 70 && number_range (1, vall[3]) == 29)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 78 && number_range (1, vall[4]) == 20)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 84 && number_range (1, vall[5]) == 29)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 87 && number_range (1, vall[6]) == 29)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 92 && number_range (1, vall[7]) == 29)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 97 && number_range (1, vall[8]) == 29)
    //    learnyes = TRUE;
    //  else if (number_range (1, vall[9]) == 69)
    //    learnyes = TRUE;
    //  if (learnyes && chr->pcdata->learned[gsn] < 100)
    //    {
    //      {
    //   SPELL_DATA *spl;
    //   spl = skill_lookup (NULL, gsn);
    //   if (spl == NULL)
    //     sprintf (buf, "ERROR!! PLEASE REPORT TO ORIN!\n\r");
    //   else
    //     sprintf (buf, "\x1B[37;1m**** [You have become better at %s!] ****\x1B[0m\n\r",
    //         spl->spell_funky_name);
    //   send_to_char (buf, chr);
    //      }
    //      chr->pcdata->learned[gsn]++;
    //    }
    //#else
    //  if (gsn == gsn_slashing || gsn == gsn_whip || gsn == gsn_concussion || gsn == gsn_pierce)
    //    {
    //      int ii;
    //      vall[0] = 950;
    //      vall[1] = 850;
    //      vall[2] = 720;
    //      vall[3] = 600;
    //      vall[4] = 560;
    //      vall[5] = 620;
    //      vall[6] = 700;
    //      vall[7] = 760;
    //      vall[8] = 825;
    //      vall[9] = 1190;
    //      for (ii = 0; ii < 10; ii++)
    //   vall[ii] += 290;
    //    }
    //  else
    //    {
    //      spell = skill_lookup (NULL, gsn);
    //      if (spell == NULL)
    //   return;
    //      if (spell->slot != 0)
    //   {
    //     vall[0] = 280;
    //     vall[1] = 150;
    //     vall[2] = 90;
    //     vall[4] = 44;
    //     vall[5] = 60;
    //     vall[6] = 75;
    //     vall[7] = 85;
    //     vall[8] = 95;
    //     vall[9] = 125;
    //   }
    //      else
    //   {
    //     vall[0] = 450;
    //     vall[1] = 330;
    //     vall[2] = 210;
    //     vall[3] = 172;
    //     vall[4] = 195;
    //     vall[5] = 215;
    //     vall[6] = 255;
    //     vall[7] = 350;
    //     vall[8] = 450;
    //     vall[9] = 600;
    //   }
    //    }
    //  learnyes = FALSE;
    //  if (chr->pcdata->learned[gsn] < 10)
    //    return;
    //  if (chr->pcdata->learned[gsn] < 20 && number_range (1, vall[0]) == 69)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 40 && number_range (1, vall[1]) == 69)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 60 && number_range (1, vall[2]) == 69)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 70 && number_range (1, vall[3]) == 69)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 78 && number_range (1, vall[4]) == 40)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 84 && number_range (1, vall[5]) == 69)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 87 && number_range (1, vall[6]) == 69)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 92 && number_range (1, vall[7]) == 69)
    //    learnyes = TRUE;
    //  else if (chr->pcdata->learned[gsn] < 97 && number_range (1, vall[8]) == 69)
    //    learnyes = TRUE;
    //  else if (number_range (1, vall[9]) == 69)
    //    learnyes = TRUE;
    //  if (learnyes && chr->pcdata->learned[gsn] < 100)
    //    {
    //      {
    //   SPELL_DATA *spl;
    //   spl = skill_lookup (NULL, gsn);
    //   if (spl == NULL)
    //     sprintf (buf, "ERROR!! PLEASE REPORT TO ORIN!\n\r");
    //   else
    //     sprintf (buf, "\x1B[37;1m**** [You have become better at %s!] ****\x1B[0m\n\r",
    //         spl->spell_funky_name);
    //   send_to_char (buf, chr);
    //      }
    //      chr->pcdata->learned[gsn]++;
    //    }
    //#endif
    //  return;
    //}


}
